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
11 replies
Subscribers
7 subscribers
Views
4265 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hello all, I have an expression rule which looks up (via query) and then re
Mike Schmitt
Certified Lead Developer
over 11 years ago
Hello all,
I have an expression rule which looks up (via query) and then returns a single member of a CDT array. My issue is that there is one corner case in which I would like to override one specific element in that CDT as it's returned, but for the life of me I can't figure out any workable way to do this. Any suggestions, or is it even possible?...
OriginalPostID-72086
OriginalPostID-72086
Discussion posts and replies are publicly visible
Parents
0
revat.anandsongkit
Appian Employee
over 11 years ago
A minor adjustment to Andrew's response. Firstly, in this case it wouldn't make a difference if you use with() or load() -
forum.appian.com/.../Evaluation_Functions
. What I would do is with( mycdt: <expression to initialize>, if(not(<corner case exp>), mycdt, type!CDT_NAME(field1: mycdt.field1, field2:mycdt.field2 ..... ) ) You need the type! constructor to cast your results to the CDT type. If you have never used a type constructor, I would recommend going to the expression editor and seeing what happens when you write type!CDT_Name(). Then play around with that...do type!CDT_Name(field1: "test") etc. Hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
revat.anandsongkit
Appian Employee
over 11 years ago
A minor adjustment to Andrew's response. Firstly, in this case it wouldn't make a difference if you use with() or load() -
forum.appian.com/.../Evaluation_Functions
. What I would do is with( mycdt: <expression to initialize>, if(not(<corner case exp>), mycdt, type!CDT_NAME(field1: mycdt.field1, field2:mycdt.field2 ..... ) ) You need the type! constructor to cast your results to the CDT type. If you have never used a type constructor, I would recommend going to the expression editor and seeing what happens when you write type!CDT_Name(). Then play around with that...do type!CDT_Name(field1: "test") etc. Hope this helps.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data