Objective:*
I want to set a variable to the teacher who is currently logged in, so that when a teacher creates a new class,his/her userid is automatically entered into the userid field of the schedule
Question:*
If I set a global variable to the current userid, an another user logs in via a second Servoy Client and enters his/her id, 1) will the first userid in the global variable change? or is a different instance of the global variable used and the first userid data retained?
fire: Question:*
If I set a global variable to the current userid, an another user logs in via a second Servoy Client and enters his/her id, 1) will the first userid in the global variable change? or is a different instance of the global variable used and the first userid data retained?
2)How can I keep the userid from changing?
3)Does servoy have session variables?
Hi Fire,
Answers:*
Globals are in-memory variables - and they are UNIQUE to each user. So you will NOT have any “collisions” with the data.
The “userId” can be the security ID of the user (if you use a Servoy Security Login) or the person’s ID (if you use your own security method)
Dunno what you’re looking for here - in terms of session variables..
BTW - if you use the Servoy Security login - you can have the “userId” column of auto-enter the ID of the currently logged in user (NO coding on your part). Just go into “Dataproviders…” and click on the column - and click the “properties” button. You can specify that the userID be auto-entered.