Save Information in a Cookie

You can save the value of any textbox, label, literal or dropdown field into a cookie variable. Note that cookie variables are valid till the expiry date-time. 

In the example below, the MyUsername cookie variable is set to the user name of the signed-in user by specifying the formula below for “Save into Cookie” event.

Step 1:  In the Page Layout Spreadsheet, select a control and open the Formulas tab.

Step 2:  In the Formulas tab, select the ‘Save into Cookie’ event and enter a formula, e.g.:

= USERNAME()

Step 3:  Build and run your application.

When saving data into a cookie variable, the data can be retrieved from a textbox, label or literal control; or from the database table.  This formula retrieves the value from the “UserName1” control:

= UsersRecordControl.UserName1.Text

UserName1.Text refers to the value for the literal UserName1.

See Also

Common Formula Examples