We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

If I have a CDT is there any way for me to list out each of its fields by name d

If I have a CDT is there any way for me to list out each of its fields by name dynamically? I was playing around with some of the functions but haven't seen anything yet.

OriginalPostID-166634

OriginalPostID-166634

  Discussion posts and replies are publicly visible

Parents
  • =split(stripwith(tostring(ri!myAnyTypeRuleInput),"[]="),",")

    and when invoking this simply pass the desired local variable holding the data. Since the rule takes Any Type anything can be passed and if the local variable contains a CDT then the tostring() will take care of this without the need for the type! constructor.

    I used the type!() constructor as an example, but any local variable, acp or pv or rule input will work.

    Example:

    1. My rule is defined as =split(stripwith(tostring(ri!myAnyTypeRuleInput),"[]="),",")
    2. I name this rule: myProject_getCDTFields
    3. I invoke it as

    rule!myProject_getCDTFields(local!myVariableThatHoldsCDTData)
Reply
  • =split(stripwith(tostring(ri!myAnyTypeRuleInput),"[]="),",")

    and when invoking this simply pass the desired local variable holding the data. Since the rule takes Any Type anything can be passed and if the local variable contains a CDT then the tostring() will take care of this without the need for the type! constructor.

    I used the type!() constructor as an example, but any local variable, acp or pv or rule input will work.

    Example:

    1. My rule is defined as =split(stripwith(tostring(ri!myAnyTypeRuleInput),"[]="),",")
    2. I name this rule: myProject_getCDTFields
    3. I invoke it as

    rule!myProject_getCDTFields(local!myVariableThatHoldsCDTData)
Children
No Data