using same id of the logged-in user

Hello,

I have an application called comments, where a logged-in user can write a comment. it has a filed called the user-id, where I’m supposed to put the user-id of the person who’s writing the comment. I don’t want to leave this to the user himself so he can chose a wrong name. I want the system fill this field with the user-id who’s already logged in.

BTW, I’m using the same security model that comes with ScriptCase, and I’m using the group option in that security model.

so please help me out in finding a solution for this problem

I believe the variable is called usr_login. So just set the field to force this: [usr_login] and you can hide the field, disable it or turn in to a label so no one can change it.

Gamer99,

Thank you so much you made my day. it works exactly as you said.

Storing Login is inefficient (unless you have just a few users). You can add new column UserID (INT) and use this field. Upon LOGIN (in the Events) you can assign this LoginID to Session Variable and the it will be at your disposal anytime. The rest is the same as <gamer99> explained

Art