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
3 replies
Subscribers
7 subscribers
Views
1306 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hello, I have a use case where I have a parent CDT that has a field t
thanosm
over 9 years ago
Hello,
I have a use case where I have a parent CDT that has a field that is an array of another CDT and i need to save values (in a submit button of a SAIL form) from some of the fields of the parent CDT down to the respective fields of each child CDT.
I have tried the following:
a!save(ri!ParentCDT.childCDT.field1, ri!ParentCDT.field1),
a!save(ri!ParentCDT.childCDT.field2, ri!ParentCDT.field2)
However, i would see a result where the value of ri!ParentCDT.childCDT[index].field1 is a list of values of ri!ParentCDT.field1.
I have also tried using applyComponents to create a list of a!save components looping over the number of ri!ParentCDT.childCDT elements and that fails because i call a rule whose definition is
a!save(ri!ParentCDT.childCDT[ri!index].field1, ri!ParentCDT.field1),
a!save(ri!ParentCDT.childCDT[ri!Index].field2, ri!ParentCDT.field2)
and it tells me that it has receive a list of variant instead of a variable to save a value.
Any ide...
OriginalPostID-172562
OriginalPostID-172562
Discussion posts and replies are publicly visible
0
thanosm
over 9 years ago
...as?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
thanosm
over 9 years ago
I know i can create a rule to define an a!save for each field of the Child CDT, but that would mean that i would have to loop through the list of Child CDTs for each of the fields that i want to update.
This is why i am trying to create a list of a!save functions for each Child CDT in the list, looping only once through that list.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tom Ryan
Appian Employee
over 9 years ago
Is it necessary to have the same data in both the parent and child CDTs? If there is already a relationship between them then you should not need the same data in both places.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel