Official Content

It saves the received value associated with the specified key. Note that this value persists in the device, and it is possible to get it back whenever by using the ClientStorage.Get method

Syntax

ClientStorage.Set(<Key>, <Value>)

Where:

<key> is the identifier of the <Value>, it has to be Strings

<Value> is the value that we want to save, it has to be Strings

Type returned

None

Example

This API is useful, for instance, when the application needs to persist some user settings in the device.

Event 'ConfirmHomeGeolocation'
  Composite
     ClientStorage.Set('HomeGeolocation', &Geolocation)
     CustomerPanel()
  EndComposite
EndEvent

Event ClientStart
  Composite
     &Geolocation = ClientStorage.Get('HomeGeolocation')
     If not &Geolocation.IsEmpty()
          CustomerPanel()
     EndIf
  EndComposite
EndEvent

Availability

This feature is available as of GeneXus X Evolution 3

Scope

See also



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant