This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
Session storage by ID

Session storage by ID 


 

Session storage by ID ( id ) -> Function result 
Parameter Type   Description
id  Text in Unique identifier (UUID) of the session on the server
Function result  Object in Storage object of the session

Note   

The Session storage by ID command returns the storage object of the session whose unique identifier you passed in the id parameter. 

In id, pass the UUID of the session for which you want to get the storage. It is automatically assigned by the server and is stored in the .id property of the session object. If the session does not exist on the server, the command returns Null

Note: You can get the session identifiers using the Process activity command. 

The returned object is the .storage property of the session. It is a shared object used to store information available to all processes of the session.

Example  

This method modifies the value of a "settings" property stored in the storage object of a specific session:

  //Set storage for a session
  // The "Execute On Server" method property is set
 
 #DECLARE($id Text;$text Text)
 var $obj : Object
 
 $obj:=Session storage by ID($id)
 
 If($obj.settings=Null)
    Use($obj)
       $obj.settings:=New shared object("text";$text)
    End use
 Else
    Use($obj.settings)
       $obj.settings.text:=$text
    End use
 End if



See also 

Process activity
Session

 
PROPERTIES 

Product: 4D
Theme: Processes
Number: 1839

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v20 R6

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)