Hello, I have a case where i need to process each CDT element of a CD

Hello,

I have a case where i need to process each CDT element of a CDT array and that processing is meant to modify the value of 1 or 2 fields of each CDT element.

Is there a way to write a Rule whose input is a CDT and its result is that same CDT having modified the value of 1 or 2 fields.

The only way i have been able to do this so far is having the rule create a new Instance of that CDT and copying the values of the CDT input to the new CDT instance while assigning the new values as a result of the desired processing to the fields that need to be updated.

OriginalPostID-193153

OriginalPostID-193153

  Discussion posts and replies are publicly visible

Parents
  • Thank you @daniell for sharing this shared component with me as I had thought of creating such a function for cases like these. However, the reason I hadn't done so yet is because I was not sure whether there is a performance gain in using this type of function (using Appian's Java API) over having a rule do the following (as an example):

    type!CDT(
    field1: ri!cdtInput.field1,
    field2: ri!cdtInput.field2,
    field3: ri!cdtInput.field3
    field4: result_value_from_processing
    )
Reply
  • Thank you @daniell for sharing this shared component with me as I had thought of creating such a function for cases like these. However, the reason I hadn't done so yet is because I was not sure whether there is a performance gain in using this type of function (using Appian's Java API) over having a rule do the following (as an example):

    type!CDT(
    field1: ri!cdtInput.field1,
    field2: ri!cdtInput.field2,
    field3: ri!cdtInput.field3
    field4: result_value_from_processing
    )
Children
No Data