I think this was noticed before, but I never heared anything from it anymore: Global Variables seem to go empty if the form they are on is showing an empty foundset. Can something be done about this?
Paul
I think this was noticed before, but I never heared anything from it anymore: Global Variables seem to go empty if the form they are on is showing an empty foundset. Can something be done about this?
Paul
Huh, I just opened a form with two globals (preset) on them, deleted all records, created one and deleted that one again.
All the time both globals showed nicely.
Then I went into layout mode and back again with that empty database, both globals were ‘alive and kicking’…
Mmm, I have a navigator form (controller) on which I have 2 global field, of which one is type Combo box. The rest of the form is in Listview. When clicking on one of the record in the listview, another mainform is opened and the records in listview on the Controller are requeried, becaus enow they have to show the records that match the main form. Now, if there areno records that belong to the main form in the listview (empty foundset), values in the combobox global on the controller form disappears…
I rechecked it and see that the value in the normal field remains there.
Sorry, had to be more precize…
Paul
So, do I understand correct:
You have a global combobox with a valuelist attached.
The valuelist holds values of the main form (list view)?
Now: if there is nothing to show on the main form, there is no valuelist?
Then, I think it is only logical there is no value either. The value the field holds can’t be found in the valuelist so it is not shown unless… The field/combo is editable…
Or is there something I miss?
The main form data has no database relation to the controller form/value list.
The value list comes from table A, the listview in the controller is based on table B and the Main Form can be based on any table.
All three groups are non related.
The Combo box is user to select the type of search needed (on invoiceid, customerid, emailadress etc). The value searched for typed in the other global field in the Controller.
The listview in the copntroller is used to navigate between the different main forms.
And the main form is just the main form…
Now, when the listview on the controller has an empty foundset, then the valuelist in the combobox becomes empty. After I make sure there is a non empty list view again, the previously set value in the combo global is gone… but a new one can be selected from the dropdown value list again.
Paul
In that case I must pass… I am overclassed by this issue!
No problem, thx for trying!
I know this is a bug that popped up long time ago and Servoy was looking into it…
Paul
globals variables are never influenced by the ammout of data in the foundset, what version of Servoy are you using?
Latest RC, on windows, standard LAF
Found a possible reason for this: allthought the value list is based on a relation between a global and a lookup table, when defining a relation,on the left hand side you have to specify a table on which the relation is based, eventhough the primary key (left hand side) is a global field.
In my situation, the table I chose for the primary kety side of the relation, is the table that delivers the records for the controller. So, could it be that because controller is showing no records (the foundset on the underlying table is empty), the relation with the global doesn’t work anymore?
Paul
Hi there,
I’m having this problem with RC7
I have an “admin” table with a single record which is used to store some settings of the solution
I have a table called “gallery” where I store all the gallery images
The “root_path” for my images folder is stored in a text field in “admin”
I have created a global text field called “g_Relation” = 1
I have created a text field in “admin” called “Relation” = 1
By creating a relation (gallery_to_admin_relation) I’m getting the value of
“root_path”
I can get the value only if there are some records in the foundset
If no records in the current foundset I can’t get the “root_path” value
Strange..
Kindly check
Thanks
Ahmad
Yes this is a limitation (currently)
Relations can only be taken through a record.
we will see if we can fix this for global relations.
This issue will be fixed in Servoy 2.0 rc8