Select to view content in your preferred language

Secure Storage and Features

444
2
11-07-2018 11:47 AM
GiatriLalla
Occasional Contributor

Hi,

How can I retrieve text from a keystring and add it as an attribute in a feature table? Thank you.

0 Kudos
2 Replies
ErwinSoekianto
Esri Alum

You can use the "value(var key)" method to retrieves data associated with the key in Secure Storage component, doc, then you can use that data or string in any operation you wish, including adding it as an attribute in a feature table for example. 

0 Kudos
GiatriLalla
Occasional Contributor

I used on the Start/login page:

//Retrieve Value

retrieveData.text = qsTr("Value:") + SecureStorage.value(key.text);

toastMessageRec.visible = false

retrieveData.visible = false

On page 1 I used:

//create attributes json for the new feature

var featureAttributes = {"Name": "retrieveData.text"};

However, when I use this, the feature does not even create nor is the feature attribute populated with info. 

0 Kudos