GetUserNames
Function | Group | Execution | Windows | Embedded | Thin Client | Mobile Access |
---|---|---|---|---|---|---|
GetUserNames | Security | Synchronous | Supported | Supported | Executed on Server | Not supported |
Syntax
GetUserNames( "tagUsers", optNumUserType, "opttagGroups" )
- tagUsers
- Name of the array tag that will receive users.
- optNumUserType
-
0 Return all users 1 Only users created during runtime 2 Only users created using the development environment - opttagGroups
- Name of the array tag that will receive the group for each specific user.
Returned value
The number of users, or a negative number that can be one of the following:
−1 | Invalid number of parameters |
−2 | tagUsers is invalid |
−3 | optNumUserType is invalid |
−4 | opttagGroups is invalid |
−5 | Error, function cannot be called in the Thin Client |
Examples
Tag Name | Expression |
---|---|
NumberOfUsers | GetUserNames(“UsersArray”) // Retrieves all users, stores names in the UsersArray tag and the number of users in the NumberOfUsers tag. |
NumberOfUsers | GetUserNames(“UsersArray”, 1) // Retrieves all users created during runtime, stores names in the UsersArray tag and the number of users in the NumberOfUsers tag. |
NumberOfUsers | GetUserNames(“UsersArray”, 2) // Retrieves all users created in the development environment, stores names in the UsersArray tag and the number of users in the NumberOfUsers tag. |
NumberOfUsers | GetUserNames(“UsersArray”, 2, “Groups”) // Retrieves all users created in the development environment, stores names in the UsersArray tag and the number of users in the NumberOfUsers tag. The group name per each user is stored in the Groups tag. |