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
4 replies
Subscribers
8 subscribers
Views
3542 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
What to write in the expression while testing a CDT in an expression rule......
akhilt
over 9 years ago
What to write in the expression while testing a CDT in an expression rule......
i.e How to enter values for the sub-dataTypes of a Complex Data Type....?
OriginalPostID-193913
OriginalPostID-193913
Discussion posts and replies are publicly visible
0
nageswararaoa
over 9 years ago
Hi akhilt, you have to enter the cdt fields in that expression.For ex:test_cdt is a cdt type variable and the fields are rowId, column1,column2. So you can define the variable in expression like this :if it is multiple {{rowId:1,column1:2}{rowId:1,column1:2}}, if it is single {rowId:1,column1:2}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Tim
Certified Lead Developer
over 9 years ago
You need to correctly identify the attributes depending on their types, so text fields should have quote, you can use the date() function for date values. If the value is null then the attribute should not be named. e.g.
type!<myDataType>(dateStmtBegin: date(2016,2,1), datePost: date(2015,10,25), status: "New")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@akhilt That should be quiet simple. For instance, the CDT in your case should be constructed as follows:
type!myCDT(
dateStmtBegin:date(2014,10,2),
/* I don't think hardcoding the value as 2014/10/2 will not work and will give you an error.*/
datePost:fn!today()
)
Let's say you have a nested CDT in the main CDT. Then it should be as follows:
type!myCDT(
dateStmtBegin:date(2014,10,2),
subCdt:type!mySubCDT(
field1:
,
field2:
and so on..
),
datePost:fn!today()
)
If you want to provide an array, make use of curly braces and include as many type! definitions as you want.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ganeshp
Certified Senior Developer
over 9 years ago
AFAIK, it cannot be tested in the expression shown. Assuming CDT's have values, this can be tested, by calling this exp. rule via interface rule, or say a textbox to see if any values are fetched from DB.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel