AppForms

Session Variables in ClaySys AppForms

Shaji | Last Updated on : February 28, 2023

ClaySys AppForms 1.0


Session variables are used for carrying on a common value in multiple forms of a tenant. On clicking Session Variables under the Data Entry section the following form is displayed :

SessionVariables

Variable Name: Enter the name of the session variable to be created.

There are three buttons on the Session Variables form, below the Session Variables title:

  • Save: On clicking this button the Session Variable with provided Variable Name is saved and displayed in the list below.
  • Delete: On clicking this button a saved Session Variable from the list can be deleted.
  • Clear: On clicking this button data entered in the text box is cleared.

A Session Variables grid with Variable Name column exists, which displays all the defined Session Variables with their Variable Names.

Example:

SessionVariables

In this example a Session Variable with its Variable Name Sessionvar1 is defined and viewed in the list column Variable Name as in figure.

Example Flow:

  1. This flow is provided to give a basic idea about the use of session variable created.
  2. Create a session variable with Variable Name ‘Sessionvar1’ and save it.
  3. Create a form “SessionForm” with a textbox “txtsession” and button “btnok”.
  4. In the rules section, add a rule named “sessionRule”. This rule is created to assign a value to the session variable Sessionvar1 and displays the Sessionvar1 in a Message box on clicking the OK button as in figure.
  5. Add an action to the rule Session (Sessionvar1)=txtsession.Value.
  6. Add an action with Messagebox(Session(Sessionvar1)).
  7. Add the trigger as btnOK.

SessionVariables

Preview:
When the button OK is clicked the session variable assigned is displayed in the Messagebox of the form named “SessionForm” as shown in figure below.

SessionVariables

  1. Create another form “Sessiontest” with a textbox “txtsestest” and button “btnok”.
  2. In the rules section, add a rule named “sessiontestRule”. This rule is created to display the value of session variable ‘Sessionvar1’on clicking the OK button as shown in figure below.
  3. Add an action to the rule txtsestest.Value= Session(Sessionvar1).
  4. Add the trigger as btnok.

SessionVariables

Preview:
When the button OK is clicked the session variable assigned through the form “SessionForm” is displayed in the textbox of the form named “Sessiontest” as shown.

SessionVariables

ShajiVice President of technology and services at ClaySys Technologies.
0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *