What to write in the expression while testing a CDT in an expression rule......

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

  • 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}
  • 0
    Certified Lead Developer
    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")
  • @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.
  • 0
    Certified Senior Developer
    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.