Default values in session variables

I am using some session variables in all my applications. Every time I start an application I have to give value to all these session variables.

Is it possible to set default values ​​for these variables so that ScriptCase not ask me its values every time I start an application?

Thanks

Hello,
Do you have try to declare some values in event onload of the form?

Best regards,
Olivier

If I do this in the onload event, I’ll have to modify my applications before sending them to production.

I’m looking for, if any, a way to give values ​​to my session variables without generating code need to modify later

Application / Global Variable / <your_variable> / Type: Out (in your start app)

Question: you mean session variable ala $_SESSION[‘user’][‘name’] or global variable ala [glo_user_name] …? In the first case you have not trouble with default values and the type-declaration of global variables. Most of my apps use $_SESSION[…] and I have not much problems with any global variables.

Reinhard,

If you use $_SESSION a lot would you try the probem I have? Just add echo $_SESSION[‘id’]; to your onscriptinit and start your app with …?id=10

I get an error.

Hi Albert,

why not use $_SESSION[‘id’] = $_GET[‘id’]?

Is there a way to use a session variable in the query for a Select field? I need to be able to use one and can’t figure out how to do it.
​and I do mean session variable not a global variable

Haven’t tried it much but you can declare a global as a session variable. If you don’t want that then the php $_SESSION superglobal is the way to go I guess.