2 Replies Latest reply on May 9, 2012 4:37 PM by NathanTodd

    Login Script - Loop Variables

    NathanTodd

      Title

      Login Script - Loop Variables

      Post

      Hi All,

      Currently I have a database that has all the Records in one table and the security settings separate them by area. I created a login script to Get(AccountName) and perform the find script however since they are external Active Directory Accounts i cannot get the correct names.

      My Login script now consists of below:

      Set Error Capture [On]

      Loop

      Set Variable [$Number; Value:1]

      Set Variable [$Val; Value:GetValue("Accounting¶CENSOC¶CHERE";$Number)]

      Perform Find [Restore] (NOTE: Find is - Area = $Val)

      Set Variable [$Error; Value:Get(LastError)]

      Exit Loop If [$Error = 0]

      End Loop

       

      My understanding is that since the accounts dont have access to all the records that the error code when running the find on records the account does not have access to should return a 401 code. Once the records with permission are found a return code of 0 then should end the loop.

      My problem is not knowing how to add + 1 to the $Number variable throughout each loop which would in turn loop through and perform a find based on the values specified till it found records the user account was permitted to see. 

       Any help would be greatly appreciated.