Is there a way to *dynamically* add a new element to a dictionary?

I'd like to at run time add new name value pair to a dictionary. Is this possible?

Thanks.

OriginalPostID-239395

  Discussion posts and replies are publicly visible

Parents
  • The problem is that updatecdt does not allow dynamic field names. But if you add

    a!fromJson(substitute(a!toJson({tzqYx62_01_:ri!value}), "tzqYx62_01_", ri!key))

    to the above code, even that is possible. It creates a dictionary with a fixed field name and converts it to JSON. Then it replaces the field name in the JSON string to the desired field name and converts it back to an Appian dictionary.
Reply
  • The problem is that updatecdt does not allow dynamic field names. But if you add

    a!fromJson(substitute(a!toJson({tzqYx62_01_:ri!value}), "tzqYx62_01_", ri!key))

    to the above code, even that is possible. It creates a dictionary with a fixed field name and converts it to JSON. Then it replaces the field name in the JSON string to the desired field name and converts it back to an Appian dictionary.
Children
No Data