Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Verified Answer
Replies
7 replies
Answers
4 answers
Subscribers
8 subscribers
Views
5274 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
How to update/save variables in interfaces that have no user interaction (no saveinto options)
Sathish Mark
Appian Employee
over 6 years ago
I want to update and save a variable in SAIL, but I don't have any user components that have a saveInto in my screen. I only have rich text display elements.
For example, in the code below, how do I save the even numbers in the second array?
You can see that I commented a saveInto because there is no saveInto in a rich text component.
a!localVariables(
local!allNumbers : {1,2,3,4},
local!evenNumbers,
{
/*display only even numbers and update the second array*/
a!forEach(
items: local!allNumbers,
expression: if(
mod(fv!item,2)=0,
a!richTextDisplayField(
value: {a!richTextItem(fv!item)},
/*saveInto : local!temp,a!save(local!evenNumbers,append(local!evenNumbers,fv!item))*/
),{})
),
/* show the second array */
a!forEach(
items: local!evenNumbers,
expression: a!richTextDisplayField(
value: {a!richTextItem(fv!item)})
)
}
)
Discussion posts and replies are publicly visible
Top Replies
Mike Schmitt
over 6 years ago
in reply to
Sathish Mark
+1
verified
Certified Lead Developer
My original answer still applies, then - user interaction on a form is required in order to make later modifications such as the ones you're after. This is the way Appian Expression Language, along with…
Mike Schmitt
over 6 years ago
in reply to
Mike Schmitt
+1
suggested
Certified Lead Developer
And, here is some example code for my two listed options above: Option 1 (version 1): a!localVariables( local!phrases: { "Today is Tuesday", "Sun rises in the East", "Charlie likes milk", …