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
6 replies
Subscribers
8 subscribers
Views
2889 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I have Question related to CDT Array. I have two CDT Arrays CDT1 and CDT2 I
rishij
over 9 years ago
I have Question related to CDT Array. I have two CDT Arrays CDT1 and CDT2
I have to compare CDT1.id = CDT2.id
if the ids match then CDT1.value is to be update by CDT2.value
Please let me know if you have any solution.
OriginalPostID-186559
OriginalPostID-186559
Discussion posts and replies are publicly visible
Parents
0
monikar
over 9 years ago
Hi rishij,
This is my understanding of the requirement: Value of CDT1.value is to be replaced with CDT2.value when the CDT2.id matches CDT1.id
For this I propose the following solution in two steps.
1. To get the updated array of CDT1.value you can use the displayValue function
Ref code: apply(fn!displyValue(value: _, inArray: CDT1.id, replacement: CDT2.value, default: default value), CDT2.id)
2. In order to set it to CDT1.value you can use the shared component specified by tim.clarke.
Ref code:
updatecdt(CDT1, { value: {updated array} })
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
monikar
over 9 years ago
Hi rishij,
This is my understanding of the requirement: Value of CDT1.value is to be replaced with CDT2.value when the CDT2.id matches CDT1.id
For this I propose the following solution in two steps.
1. To get the updated array of CDT1.value you can use the displayValue function
Ref code: apply(fn!displyValue(value: _, inArray: CDT1.id, replacement: CDT2.value, default: default value), CDT2.id)
2. In order to set it to CDT1.value you can use the shared component specified by tim.clarke.
Ref code:
updatecdt(CDT1, { value: {updated array} })
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data