Update Property In Array Of Objects

I am fairly new to Appian, and I want to dynamically update a property in array of objects (the objects are of any type).
so in terms of other programming language, something like below:

ri!List_Of_Any_Type_Object[ri!Index_Of_Object].<Property_Name> = value

OriginalPostID-248744

  Discussion posts and replies are publicly visible

Parents
  • Added to above, Find the below code snippet with which you can update a dynamic property of a given cdt. There are 2 base rules:
    1. to create dictionary with some work around
    2. to update a specific peroperty of the cdt

    And there is a main rule where I have formed the cdt as a static dictionary, which you can make as a parameter to the rule, and forming the dictionary values using the first base rule and then updating the indexed cd t row with the formed fieldAndValue parameter. Here I have made use of reduce function because if you need to update more than 1 parameter at the same index of the cdt, the function updatecdt() won't give proper result and if you go for apply() function it will result in as many number of rows as have for local!fieldAndValue variable.
    It is just a work around that may help you.

    Updating Dynamic Property of a CDT.txt

Reply
  • Added to above, Find the below code snippet with which you can update a dynamic property of a given cdt. There are 2 base rules:
    1. to create dictionary with some work around
    2. to update a specific peroperty of the cdt

    And there is a main rule where I have formed the cdt as a static dictionary, which you can make as a parameter to the rule, and forming the dictionary values using the first base rule and then updating the indexed cd t row with the formed fieldAndValue parameter. Here I have made use of reduce function because if you need to update more than 1 parameter at the same index of the cdt, the function updatecdt() won't give proper result and if you go for apply() function it will result in as many number of rows as have for local!fieldAndValue variable.
    It is just a work around that may help you.

    Updating Dynamic Property of a CDT.txt

Children
No Data