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
2886 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
PhilB
A Score Level 1
over 9 years ago
Bit delayed, but I was thinking more like something below.
A supporting rule, eg rule!myRule(), with two non-array inputs of CDT1 and CDT2 of the equivalent types:
type!CDT2(
value: if(
isnull(
ri!CDT1.value
),
ri!CDT2.value,
ri!CDT1.value
)
)
...then a call of that rule within an apply, iterating over the arrays of the two types of CDT:
apply(
rule!myRule,
merge(
local!arrayOfCDT1,
local!arrayOfCDT2
)
)
You could edit the supporting rule to map any number of fields, conditional or otherwise.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
PhilB
A Score Level 1
over 9 years ago
Bit delayed, but I was thinking more like something below.
A supporting rule, eg rule!myRule(), with two non-array inputs of CDT1 and CDT2 of the equivalent types:
type!CDT2(
value: if(
isnull(
ri!CDT1.value
),
ri!CDT2.value,
ri!CDT1.value
)
)
...then a call of that rule within an apply, iterating over the arrays of the two types of CDT:
apply(
rule!myRule,
merge(
local!arrayOfCDT1,
local!arrayOfCDT2
)
)
You could edit the supporting rule to map any number of fields, conditional or otherwise.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data