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
13 replies
Subscribers
7 subscribers
Views
7205 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Can anyone explain why data is not save in the "saveInto".Below is the
kumara0002
A Score Level 1
over 9 years ago
Can anyone explain why data is not save in the "saveInto".Below is the code snippet-using Appian 7.5 and 7.8
load(
local!aggregateID,
local!var1,
local!data: {{label : "ABC",aggregateID : "123"},{label : "XYZ",aggregateID : "456"}},
{
a!linkField(
label:"( Set same as that of household )",
links:fn!apply(
a!dynamicLink(
label :_,
value:_,
saveInto: {
local!aggregateID,
local!var1
}
),
merge(fn!index(local!data,"aggregateID",{}),fn!index(local!data,"aggregateID",{}))
)),
a!textField(value : fn!index(local!data,"aggregateID",{})),
a!textField(value : local!aggregateID)
}
)
Error in 7.5 as :- An error occurred while executing a save: Expression evaluation error : You must specify a variable to ...
OriginalPostID-141120
OriginalPostID-141120
Discussion posts and replies are publicly visible
0
kumara0002
A Score Level 1
over 9 years ago
...save into, such as ri!name << fn!sum. Received: ListAtIndices.
..
No error in 7.8 and the value is also not getting updated in local variables.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
There is a known issue in 7.8 (and maybe previous versions) where you can't save into multiple targets when directly using a!dynamicLink in a looping function such as apply() or applyComponents(). If you put the dynamicLink control into a sub-expression and call that instead in your apply() then you will be able to save into multiple targets.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
best
Certified Lead Developer
over 9 years ago
Thanks tim. It worked.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumara0002
A Score Level 1
over 9 years ago
Thanks Tim.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mikej117
over 9 years ago
I'm also facing this issue. Is there a page that lists these known issues?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ankitb0003
over 9 years ago
I am facing the same problem in Appian 7.7, do we have any workaround for this?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mikej117
over 9 years ago
I created a workaround that Tim Clarke suggested and got this to work (thanks Tim!).
For me, this consisted of creating a separate rule to implement the logic contained within the apply() call.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Steve Heichelheim
over 9 years ago
mikej117, can you provide a sample of your separate rule and how you called the rule?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mikej117
over 9 years ago
Hi steveh444, here are some code snippets. Firstly, here's the separate rule I created:
a!dynamicLink(
value: ri!teacherDataInput,
saveInto: {
a!save(ri!teacherUsername, property(ri!teacherDataInput, "username")),
a!save(ri!teacherInfo,
rule!HR_convertEmployeeCdt(
ri!teacherDataInput
)
)
}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mikej117
over 9 years ago
... and here is a snippet of the calling code:
a!sectionLayout(
firstColumnContents: {
a!gridField(
label: "Search Results",
totalCount: local!searchResultDataSubset.totalCount,
columns: {
a!gridTextColumn(
label: "Username",
field: "username",
data: index(local!searchResultDataSubset.data, "username", {}),
links: apply(
rule!HR_teacherSelectionAdvancedSearchLink(
_,
ri!teacherUsername,
ri!teacherInfo,
{ a!save(local!showAdvancedSearch, false) }
),
{local!searchResultDataSubset.data}
)
),
a!gridTextColumn(
label: "First Name",
field: "firstName",
data: index(local!searchResultDataSubset.data, "firstName", {})
),
a!gridTextColumn(
label: "Last Name",
field: "surname",
data: index(local!searchResultDataSubset.data, "surname", {})
)
},
value: local!searchResultPagingInfo,
saveInto: local!searchResultPagingInfo
)
}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>