Thanks Rene, I know this but my doubt is whtich is the difference between SetValue and SSV
The problem I see with GV and GSV is the following:
Suppouse you call the same form from a browse to change/delete and from the menu to add, then the form needs to know from where it is called to hide/unhide some fields and to know where to go back on save/cancel.
Then I call the form from the menu adding a parameter to the URL.
In the form I need to GV and SSV to remember that situation because the form calls itself for pre and post without maintaining the GV value.(*)
Doubt: its ok to save so much volatile values to the session queue? what about the memory space? is there any garbage collector method to get rid of this?
Lets continue, then with the GV/SSV/GSV I can use the form adding and go back to the menu.
Then I enter the browse, the browse does not send the URL parameter to the form.
In this case, you cant use GV to check from where its called because there allways be a time when the parameter is blancked (see * above)
Then if you call the form from the browse, without the param and it has been calle by the menu first it will behave the same a s called by the menu.
To solve this may be you have to set the SSV value at the beggining of the browse, but in the form, how do you know who was first?
Suppouse the session value is called SOA and a param value callet OA
Calling the form from the menu
-Menu call the form adding OA=1 to the URL
-The form checks the SSV value to see if its called by the browse
if gsv('SOA')='browse'
...
else
-The form checks the GV
if gv('OA')=1
ssv('SOA')='menu'
end
then all continues ok
Calling the form from the browse
-You need to set the ssv to 'browse'
-The form checks the SSV value to see if its called by the browse
if gsv('SOA')='browse'
then all continues ok
Calling the form again from the menu
-Menu call the form adding OA=1 to the URL
-The form checks the SSV value to see if its called by the browse
if gsv('SOA')='browse'
PROBLEM!
-The form checks the GV
if gv('OA')=1
ssv('SOA')='menu'
end
REMEMBER you cant check for gv('OA')<>1!!
Then theres no way to go back to the menu way of accesing the form.
I found it like the dog who want to catch its tail.
Is there another way to do it ?
Regards
Alberto