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
7 subscribers
Views
3267 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I have a process variable of MULTIPLE text data type. I would simply like to st
zulfiqarp
over 9 years ago
I have a process variable of MULTIPLE text data type. I would simply like to store this variable into a cdt with multiple values. For example, if I have a multiple text data type "dept" process variable with {"Accounting", "Finance", "Operations"} values, I would like to store the values of "dept" process variable to a "deptDetail" cdt ("deptDetail.dept"). I tried using script task by going to output section and saving the "dept" to "detpDetail.dept" cdt, but its only writing the first value. Can someone help in this regard?
Thanks!
OriginalPostID-160677
OriginalPostID-160677
Discussion posts and replies are publicly visible
0
Richard
over 9 years ago
It sounds like deptDetail is an array of this particular CDT, if that is true, you can try:
apply(
type!deptDetail (
dept: _
),
merge({"Accounting","Finance","Operations"})
Which essentially creates an array of three deptDetail CDT's each with a different "dept" value from the merge() function. However, if this is a pre-existing CDT array and it contains other values you wish to preserve, you may wish to explore writing a rule that accepts the CDT and the update value and use the looping functions to iterate across your existing array of CDTs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 9 years ago
Sorry, you don't need the merge function there!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 9 years ago
But you might read:
forum.appian.com/.../Looping_Functions.html
for some further ideas
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
zulfiqarp
over 9 years ago
Thank you for your reply... The cdt is blank and it contains other fields/columns. Can I simply put merge(dept) as output and save the output as "deptDetail.dept"? deptDetail cdt is empty prior to writing the data from dept variable.
Thanks!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sonalk
over 9 years ago
Hi Zulfiqarp,
You can use the option "is appended to list" in the outputs of the script task to store dept process variable(multiple type) into the deptDetail.dept. Also make sure the cdt column is multiple type. This will allow you to store all the values of the dept into the CDT field.
Hope it helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Javid Attar
over 8 years ago
Hi Zulfiqarp,
Did you find solution, becoz I landed into same issue if yes please can share the solution it would be great
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sonalk
over 8 years ago
Hi Javida,
Check the solution provided by Sikhi in the another similar post:
forum.appian.com/.../e-161479
Hope it helps!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel