Get Storage Data
You can get the stored data in two ways:
To retrieve the stored data from the connected database of the extension, follow the instructions given below:
- In your local drive, go to your Project folder which you created initially while building your first widget.
- Open widget.html file in app folder, with the help of editor.
- In widget.html file, provide the Request to get the data from database.
This request includes two parameters: key and queriableValue. And the request must include at least one of these parameters.
- Save the file.
- Pack and publish the extension.
Now, the required data will be successfully retrieved from the database. This data can be used to develop the code functionalities of your extension.
Note: If you specify the limit in the given format, the data will be fetched accordingly; otherwise, the first 20 records will be fetched by default.
Sample Request
Copied
To fetch the stored data via functions, follow the steps given below:
- Go to Sigma > Functions > Add Function > Create your function.
In the function editor, provide the given sample request.
In this request, a connection will be used to store the data. For that connection, scopes should hold the value 'Desk.extensions.ALL'.
- Save the function.
- Associate function with the extension.
- Publish the extension.
Now, the data will be successfully retrieved from the database by calling this function. This data can be used effectually for developing your extension.
Sample Request
Copied