1 Reply Latest reply on Nov 11, 2014 9:42 AM by philmodjunk

    adding condition to privileges



      adding condition to privileges


      Hi there.

      I have this condition for a privilege set, allowing them only to edit records if the time hasn't been exceeded since created date. It works great but I need to add another condition.

      So, it's this condition / calculation:

      // Get(AccountName) = Team Leader and
      (CreationDate  > (Get(CurrentTimeStamp)-86400))


      If a specific script was activated, that Team Leader also loses the capability of record edition, even if the time hasn't run out.


      Can anyone give a hand, please? Thanks in advance!


        • 1. Re: adding condition to privileges

          In your current calculation, comment characters cause FileMaker to ignore the first row. Is Team Leader a field name or should this text be in quotes?

          I'm guessing that you need this expression:

          ( Get ( AccountName ) = "Team Leader" and not $$Locked ) OR
          (CreationDate  > (Get(CurrentTimeStamp)-86400))

          Your script would set the variable $$Locked to True to lock out changes by the Team Leader. This allows a user with an account named "Team Leader" to always be able to access the record unless the variable $$Locked is set to true.

          If you need the "lock" to take place on a record by record basis, set a field in the record to True and refer to that field in the expression in place of the global variable.