Hi all, I have a form used to create/update system user details. Apart from the usual fields for name phone etc, there is a field to capture user access level. This can be one of three options – Level 1, Level 2, Level 3 (basic user).
When an existing user’s details are updated, as it about to be saved I would like to have some form of validation done. I want the system to check that there is at least one recorded user who has Level 1 access. What I need to avoid is someone updating records and changing say a user from Level 1 to Level 2 and leaving no Level 1 users (top level access).
I have played with validation like the below using an alias of the file without any luck. Just wondering if anyone has done anything similar and how.
MAK1a:Active = 1
MAK1a:AccessLevel = 1
Loop until Access:DecMakers1a.Next()
IF MAK1a:Active <> 1 then cycle.
IF ERRORCODE() THEN BREAK. !End of file check
If MAK1a:AccessLevel = 1
ManagerLevelCount += 1
If ManagerLevelCount = 0
Message(‘No Manager access set yet ???’)