Announcement

Collapse
No announcement yet.

Need help with security

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with security

    Hi,

    I need some help. I have created application level security for my project using the security module. Now I have various forms with a User ID field set as hidden. Can someone please tell me how to pass the user id or name of the logged in user to the field on the form so that it may be saved with the record. Where do I enter the variable name etc.

    Also I need to show users only their own records (where the user id matched the logged in user id).

    Any help would be greatly appreciated. Please be advised Im just starting out with SC so baby steps are needed

    Thanks in advance.

  • #2
    Whoops figured out half of the problem. For anyone else. Just insert the [usr_login] in the field where you want the value to be stored.

    Comment


    • #3
      Originally posted by gamer99 View Post
      Whoops figured out half of the problem. For anyone else. Just insert the [usr_login] in the field where you want the value to be stored.
      Answered this already in another thread. Add a 'owner' field to the table. Don't show it on the screen. In the onvalidateevent: {owner}=[usr_login] or in the edit menu set this field in insert and update.

      Then on every screen depending on this field add the 'where owner = '[usr_login]'; to the sql.

      That's it.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Yes, thats exactly what I ended up doing. Thanks a lot for the help.

        Comment

        Working...
        X