Hi
I want to have an event when anyone, creates a new user on a specific Usersource from the Web Page config in Ignition. Is there any way to detect it?
If not how can I poll Ignition resources (for example every minute) to see if any new user added?
You can run system.user.getUsers - Ignition User Manual 8.1 - Ignition Documentation in some gateway timer script to get the full list of users for a given data source. You'd probably need a database table or memory dataset tag to record what the last records were so you can detect differences.
I don't know that the order system.user.getUsers
is deterministic, but if it is, or if you could write it inside a list comprehension that ordered it in a function, you could probably get away with putting a runScript
in a memory dataset tag calling a function returning the users in a determined order, and then do a tag change event on that tag - it should only run if a user was added or subtracted.
1 Like
No, constructed datasets are always new values, even if the content is the same. You''ll get a change event every time.
2 Likes
Right, I messed that up. Ignore my second suggestion, first one should be viable still.
1 Like