Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
2349 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
declare an EntityStore as local variable
eliav
over 7 years ago
Hi All,
is there a method to define a variable as a Entity Data?
I am using the function a!writeToDataStoreEntity(<dataStoreEntity>, <valueToStore>)
I would create data object (valueToStore) to fill it with data inserted by the user
I have tried to declare it as local!newContainmentAction:a!entityData(cons!NCContainmentAction, null)
I am am receiving the message
Could not display interface. Please check definition and inputs.
Interface Definition: Expression evaluation error at function a!textField [line 327]: Invalid index: Cannot index property 'delegateMail' of type Text into type EntityData
OriginalPostID-248689
Discussion posts and replies are publicly visible
0
karthiksaik
over 7 years ago
@eliav Can you please attach the code snippet, at the place which you using this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
eliav
over 7 years ago
Ciao karthiksaik,
I have just solved using this code
local!newContainmentAction: fn!cast('type!NonConformityContainment',{}),
The cast function returns an empty object
So we can use it to save data
label: "Delegate e-mail address",
value: local!newContainmentAction.delegateMail,
saveinto: local!newContainmentAction.delegateMail
Then to write into DB the entire object
local!writeToDataStoreEntity(cons!NCContainmentAction,local!newContainmentAction),
Is this approach correct ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 7 years ago
This is a valid approach if you do not want to store the data in process.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
karthiksaik
over 7 years ago
Yes this is correct approach.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
eliav
over 7 years ago
Good, thank you for your help
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel