ServerSandboxGet
ServerSandboxGet returns the name of the sandbox identified by the number N, where N is the parameter entered.
This function is valid in TM1® TurboIntegrator processes only.
Syntax
ServerSandboxGet( index )
or
ServerSandboxGet( index, username)
Arguments
The index of the requested sandbox in the user's sandbox collection. The index space will be contiguous, so the first occurrence of an empty string return can be used to break iteration. Also, deleting a sandbox will alter the indexes of any sandboxes that follow that sandbox in the list.
ServerSandboxGet 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;