Dictionary Manipulation


**NOTE: This plug-in is deprecated and no longer recommended for use for sites running on Appian 21.4 or later. The functionality of this component is available in Appian without installing the plug-in. You can use a!update() and a!keys() in Appian 21.4 or later.**

Dictionaries are one of the most useful data structures available in Appian. This plug-in provides tools to dynamically create dictionaries from key-value pairs, update dictionaries with new values (including nested dictionaries), and understand what keys are available in a dictionary to help with dynamic control.

Key Features & Functionality


  • createDictionary - Takes a list of keys (Any Type) and a list of values (Any Type) and returns an Appian Dictionary representation of those data. The list of keys and values MUST be of the same length or an error will be thrown. If no keys are provided an empty Dictionary will be returned. This provides a high-performance, low difficulty means of creating dynamic dictionaries (no more fromJson())
  • updateDictionary - Takes a CDT or Dictionary to update as well as a CDT or Dictionary containing the keys and values to insert/update and returns the updated result. If the input was a CDT the output will be cast to the same type for data cleanliness. This can be used to update specific keys of the dictionary, or to merge two disparate dictionaries into one.
  • getKeysFromDictionary - Takes a CDT or Dictionary as input and returns a List of Text representing the included keys.


  • joinCdt:  Analogous to a SQL join statement. Useful for manipulating CDTs which are never written to a database.
  • expandCdt: Expands a CDT with a nested list or CDT.  It will create a new row for every value in a nested list or new column for every column in a nested CDT.   Also, an expanded list's column will be cast to a scalar value.
  • updateCdt: Takes in a CDT, dictionary, or list of either and a dictionary containing the updated values and returns the updated CDT.
  • Like a dictionary array... {a!map(date: _, value: _), ...}

  • What other data structure would you recommend? I need to order to be preserved for my use case because I need to do a cumulative sum of values over time (keys: dates) after I create the dictionary.

  • Here's an upgraded version of this code that handles null and empty values in both parameters and returns a value with the same structure (single value vs. array) as the input.

        keys: a!keys(ri!fieldsAndValues),
        values: a!forEach(items: local!keys, expression: ri!fieldsAndValues[fv!item]),
        if(count(ri!dictionary) > 1,
            items: ri!dictionary,
            expression: a!update(fv!item, local!keys, local!values)
          a!update(ri!dictionary, local!keys, local!values)

  • updatedictionary() can be mimicked with a function, having inputs "dictionary" (any type) and "fieldsAndValues" (map). The body of the function (expression rule) is as follows:

    keys: a!keys(ri!fieldsAndValues),
    values: a!forEach(local!keys, ri!fieldsAndValues[fv!item]),
    a!update(ri!dictionary, local!keys, local!values)
  • If you wish to mimick the createdictionary() function with out-of-the-box functionality (as of 21.4), create an Expression Rule with the inputs of "keys" (List of Text) and "values" (Any Type) and use this as the body of the Expression:

    a!update(cast(94, {}), ri!keys, ri!values)
  • Try updating just the "emails" property with local!mergedEmails as the value and see if you get a similar error. If you don't and the update works, you can combine 2 separate a!update() calls like so:

    data: a!update(
    data: local!existingContactInfo,
    index: "emails",
    value: local!mergedEmails
    index: { "relatedEntityId", "relatedEntity" },
    value: { ri!CO_Person.id, cons!CO_RELATED_ENTITY_PERSON }
  • Hi everyone, how can update a list of CDT in a CDT;

    value:{local!mergedEmails, ri!CO_Person.id,cons!CO_RELATED_ENTITY_PERSON}

    emails = list of cdt

    local!mergedEmails= list of CDT (containing 2 elements)

    getting this error :

  • Hi Daniel, we have used this plugin in our application. In light of the recent discovery of vulnerabilities with log4j2, we would like to know if this plugin uses the affected version Log4j2, and if yes, would you release an updated version of this plugin to counter the exploit of vulnerability?

  • Hi, updatedictionary is not working in forEach with a list of CDT's, it doesn't do any changes. This plugin works with 20.4 version?

  • Will this plugin still work on 16.2 version ?