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
5 replies
Subscribers
7 subscribers
Views
4987 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Anyone know a way to update a CDT column dynamically using a custom rule or func
dsmithgxp
Certified Associate Developer
over 9 years ago
Anyone know a way to update a CDT column dynamically using a custom rule or function? I realize I can create a script task to loop through the CDT and set the column value. I just wanted a more dynamic way to doing it.
CDTa - can be multiple values.
CDT columns - column1, column2, column3
I want to loop through the CDT and set column2 to a specific numeric value
I reviewed the apply function and the custom plugins - IFM Manager, Set CDT Properties and CDT Manipulation - just wondering the most efficient option.
OriginalPostID-150052
OriginalPostID-150052
Discussion posts and replies are publicly visible
Parents
0
mahipalc
over 9 years ago
Hi dsmithgxp,
Have a look at below, might help you:
1) Let's say you want to update pv1_CDT.column2.
2) Initially fill pv1_CDT by querying DB.
3) Prepare an array type, with the values you want to update at column2.
4) In script task output's use operator "is stored at index" to store above array at indices calculated by below expression:
enumerate(length(pv!pv1_CDT))+1
Look for error: The count of indices and the count of "values to update array" should be equal length.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
mahipalc
over 9 years ago
Hi dsmithgxp,
Have a look at below, might help you:
1) Let's say you want to update pv1_CDT.column2.
2) Initially fill pv1_CDT by querying DB.
3) Prepare an array type, with the values you want to update at column2.
4) In script task output's use operator "is stored at index" to store above array at indices calculated by below expression:
enumerate(length(pv!pv1_CDT))+1
Look for error: The count of indices and the count of "values to update array" should be equal length.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data