Storage Component
  • 13 Feb 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Storage Component

  • Dark
    Light
  • PDF

Article Summary

The Storage Component consists of blocks that operate on two types of Storage:

  • Session Storage
    • Get storage variable
    • Set Session
    • Remove session variable
    • Clear session.
  • Persistent Storage 
    • Get Local
    • Set Local
    • Remove Local

Session Storage

Get storage variable

The Get Item block is used to fetch a particular Key-value placed within a session storage variable.
InputOutputBlock LayoutGenerated Code

Name or Key in Text or variable


Returns the value of any type.


GetStorageVar
(__er.getSessionStorage('key', value));

Set Session

The Set Session block is used to set a particular key-value pair to a specific session variable.
InputOutputBlock LayoutGenerated Code

Name or Key in Text or Variable,

Value any type


Store the key-value pair to the session storage.


SetSession
__er.setSessionStorage('key', );

Remove session variable

It is used to remove a particular item in a session variable placed within a session storage block.
InputOutputBlock LayoutGenerated Code

Name or Key in Text

Remove the key-value pair from session storage using the key.


RemoveSession
 __er.removeSessionStorage('key');

Clear session

This block clears all session storage data.
InputOutputBlock LayoutGenerated Code
NA

Removes all the session storage key-value pairs.


ClearSession
__er.clearAllSessionStorage();

Persistent Storage

The Persistent storage blocks are used to operate on local storage data. The local variables can be accessed in the app behavior section of any business function(across projects) within the EdgeReady platform.

Get Local

 This block is used to fetch a key-value pair from a local variable. 
InputOutputBlock LayoutGenerated Output

Name or Key in Text

Returns the value of any type.

GetLocal
(__er.getLocalStorage('key'));

Set Local

This block is used to set a key value to a particular local variable. 
InputOutputBlock LayoutGenerated Output

Name or Key in Text or Variable

Value any type


Store the key-value pair to the local storage variable


SetLocal
 __er.setLocalStorage('key' , 'value');

Remove Local

This block is used to remove the existing key-value of a variable from the local storage.

InputOutputBlock LayoutGenerated Output

Name or Key in Text

Remove the key-value pair from local storage using the key.


RemoveLocal
 __er.removeLocalStorage('key');



Was this article helpful?

ESC

Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses