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
4 replies
Subscribers
7 subscribers
Views
2795 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I'm having problems trying to update all the items in an array (copying the
Gavin Hume
Certified Senior Developer
over 9 years ago
I'm having problems trying to update all the items in an array (copying the value from one element into another) when the user clicks on a link.
As part of a user interface that captures fund allocations we want to be able to click on a single link/button/checkbox and for it to set the allocation percentage to 100 for all funds in an array and set the estimated value to the current value for each of those funds. The percentage field is editable whereas the estimated value is calculated based on the percentage (which works fine when calculated as part of the saveInto after the percentage is manually input).
The following code works fine but I need to be able to dynamically create the necessary a!save rows for each item in the local!items array:
a!linkField(
links: a!dynamicLink(
label: "Disinvest all funds",
value: 100,
saveInto: {
local!items.percentageToSwitch,
a!save(...
OriginalPostID-146618
OriginalPostID-146618
Discussion posts and replies are publicly visible
Parents
0
Conor Cahill
Certified Lead Developer
over 9 years ago
using applycomponents your subrule should take the following parameters:
items: your items array
index: a generated list of indexes for items in the array
valueToSave: your value to save (in this case 100)
inside the rule you should do a!save(ri!items[ri!index], ri!valueToSave)
Let me know if that works and if you have any questions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Conor Cahill
Certified Lead Developer
over 9 years ago
using applycomponents your subrule should take the following parameters:
items: your items array
index: a generated list of indexes for items in the array
valueToSave: your value to save (in this case 100)
inside the rule you should do a!save(ri!items[ri!index], ri!valueToSave)
Let me know if that works and if you have any questions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data