2 Replies Latest reply on Jul 18, 2016 1:48 PM by johnleak

    Need Help Writing a Script Trigger to Hide an Object (conditionally)

    johnleak

      Hello--

      I am working on a solution in which I need to hide the unit price for an item from all users except for the solution adminstrator.  Here is what I have done and what I am thinking.  I wrote a script to set a variable.

       

      The script is running from a script trigger set to when the object exits

      If { Get( AccountName) = "John Lawrence"}

      Set Variable ($$notseepricing ; Value:1)

      End IF.

       

      I then went to the field in the table that I want to Hide.  I opened the Field Inspector and in the Behavior section of the Data under Hide If:

      $$notseepricing (symbol for does not equal) 1.

       

      So what the result has ended up being is that when the script trigger runs it is now hiding that field from everyone including the person that I want to see it.  If I monkey with the script or the information in the Hide If tab in inspector.  I can get it to show the field to myself, but  also to everyone as well.  I have not been able to find a combination to where I can see the information in the field, but others can not.

       

      What am I missing?