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
7 replies
Subscribers
8 subscribers
Views
8146 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Is there a way to populate the values for an array variable from 2 different arr
jayanthik
over 10 years ago
Is there a way to populate the values for an array variable from 2 different array variables in SAIL?
i have a array variable CDT_1 which has a ,b and c as fields and another array variable CDT_2 which has x,y and z as fields. Now I have an array variable CDT_3 which represents a CDT with fields a,b,c,x,y,z. I want to populate the CDT_3 from CDT_1 & CDT_2 in SAIL.
OriginalPostID-145331
OriginalPostID-145331
Discussion posts and replies are publicly visible
0
Conor Cahill
Certified Lead Developer
over 10 years ago
You can do this with a type constructor:
type!CDT_3(
a: CDT_1.a,
b: CDT_1.b,
c: CDT_1.c,
x: CDT_2.x,
y: CDT_2.y,
z: CDT_2.z
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vivekg539
over 10 years ago
Try joincdts()
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jeromew
over 10 years ago
If it's just a,b,c,x,y,z you can simply use union on them. Bear in mind that union will strip duplicates.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
If you want to return an array of CDT_3 and assuming that CDT_1 and CDT_2 are of equal length, you can also do:
apply(
type!CDT_3(
a: _,
b: _,
c: _,
x: _,
y: _,
z: _
),
merge(
CDT_1.a,
CDT_1.b,
CDT_1.c,
CDT_2.x,
CDT_2.y,
CDT_2.z
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jayanthik
over 9 years ago
thanks that works!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
anushrid849
over 9 years ago
Hi All,
I have a similar requirement and though I can work with the type constructor. But I am trying to join the CDTs with the function joincdts(). However, I am getting null error.
Expression evaluation error in rule 'lepp_applicationhistoryform' at function 'joincdts' parameter 3 [line 7]: Invalid index: Cannot index property 'id' of type Text into null value of type LEPP_PrepaidMain?list
Any suggestions is highly appreciated.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
amitas823
over 7 years ago
I have a requirement to populate a paging grid in a report with data from 2 different CDTs without creating views. I have created 2 expression rules,
Rule1: Fetches data from 1st CDT
Rule2: fetches data from 2nd CDT
There is just 1 field common between both the CDTS.
The total count fetched for the "List of Variants" isn't the same i.e the length differs.
I need help in combining fields from CDT1 and CDT2 in CDT3
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel