Announcement

Collapse
No announcement yet.

Hide "pencil" based on user

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

  • Hide "pencil" based on user

    I have created a link between a grid and a form using the scriptcase tutorial.
    I wonder if it is possible to hide/show the "pencil" button / column based on the user login?

    Can someone point me in de right direction?

    Kind regards,

    Marco

  • #2
    Try the following to turn them on / off....

    Code:
    sc_apl_conf("<your_app_name>", "lig_edit", "off");

    Comment


    • #3
      Hello,

      i tried to add "sc_apl_conf("<your_app_name>", "lig_edit", "off");" to the login event, but the pencil is still there, and the user can click and use the link to get to the form.
      i am using the app_name which is in de list.

      Comment


      • #4
        login event?

        Look up the usage of that macro in the help - it is used by one app to control another.

        So from, say, either your menu app, or login app - call that macro from the onApplicationInit event, but refer to the app of the grid you want to change based on the logged in user: [usr_login]

        Comment


        • #5
          Sorry,

          I made a mistake.
          I put the if statement with the "sc_apl_conf("<your_app_name>", "lig_edit", "off");" in the "OnValidateSucces" statement from the "App_login".
          But the statement was after the "sc_redir" statement, so it was not executed. I changed is and it works fine.

          Thanks for your help.

          Comment


          • #6
            :-) glad it's working

            Comment

            Working...
            X