ServerSandboxListCountGet
ServerSandboxListCountGet returns the count of sandboxes as a number.
This function is valid in TM1® TurboIntegrator processes only.
Syntax
ServerSandboxListCountGet()
or
ServerSandboxListCountGet( username )
Arguments
ServerSandboxListCountGet
takes an optional string parameter, the owning
client's name. The calling client can use the optional parameter to specify a client other than
themselves if the calling client has the appropriate privileges. A privilege error will result if
the specified client is not the executing client and the executing client is not a member of the
DataAdmin or ADMIN groups. If the optional parameter is not used, the active client's sandboxes are
the subject.
Example
The following snippet shows how the ServerSandboxExists, ServerSandboxGet, and ServerSandboxListCountGet functions can be used to iterate the sandboxes of user called User1 and output those sandboxes to a text file. The TurboIntegrator process would successfully execute for members of the Admin or Data Admin groups and for user called User1. The TurboIntegrator process would fail with a privilege error for any other users.
SandboxIndex = 1;
NumSandboxes = ServerSandboxListCountGet( 'User1' );
WHILE( SandboxIndex <= NumSandboxes );
SandboxName = ServerSandboxGet( SandboxIndex, 'User1' );
IF( ServerSandboxExists( SandboxName, 'User1' ) = 1 );
ASCIIOUTPUT( 'C:\User1Sandboxes.txt', SandboxName );
ENDIF;
SandboxIndex = SandboxIndex + 1;
END;