Dictionary Manipulation

Overview

**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

FUNCTIONS

  • 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.

DEPRECATED FUNCTIONS

  • 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.
Anonymous
Parents
  • joinCdt is not working in 18.4

    I tried using the example given in the download and that did not even work:

     local!a: { {a:1,b:{1,2}} , {a:2,b:2} },

     local!b: { {c:1,d:5} , {c:3,d:6} },

     joincdts("INNER", local!a, {"a"}, local!b, {"d"}, "a", "c", "a", "b")

    get the following error: Expression evaluation error at function 'joincdts'

  • joinCdt has been deprecated in the latest version due to functional issues and lack of interest. It will continue to work as it did but will no longer be discoverable or maintained. There are some great new functions though!

Comment Children
No Data