Appendix: Built-in Scripting Language Note: The tag name must be enclosed in quotes, as shown in the syntax diagram, or else the project will try to get the value of the named tag. Returned value This function returns the following possible values: Examples Get the full name of the currently logged user (via the system tag UserName ): GetUserFullName( UserName, "UserFullName" ) Get the full name of the user "engineer1": GetUserFullName( "engineer1", "UserFullName" ) GetUserNames Syntax GetUserNames( " tagUsers ", optNumUserType , " opttagGroups " ) tagUsers Name of the array tag that will receive users.
optNumUserType 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: Examples Page 494 InduSoft Web Studio Value Description 0 Specified user does not exist. 1 Success; specified user exists.
Function Group Execution Windows Embedded Thin Client GetUserNames Security Synchronous Supported Supported Executed on Server 0 Return all users 1 Only users created during runtime 2 Only users created using the development environment −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 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.