**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.
FUNCTIONS
DEPRECATED FUNCTIONS
You can't pass a list of dictionary into the expression, instead do:
a!forEach( items: { { A1: 0, test: 01 }, { A1: 0, test: 01 }, { A1: 0, test: 01 } }, expression: updatedictionary( fv!item, { A1: 1 } ))
@ilan.gold
the function "updatedictionary" is throwing
error:Expression evaluation error at function 'updatedictionary': Could not cast from List of Dictionary to Dictionary. Details: CastInvalidCould not cast from List of Dictionary to Dictionary. Details: CastInvalid
for below code :( i am trying to update "multiple cdt/array cdt" )
updatedictionary( dictionary: { { A1: 0, test: 01 }, { A1: 0, test: 01 }, { A1: 0, test: 01 } }, fieldsAndValues: { A1: { 1, 1, 1 } })
What is the need to have the keys in a particular order? The behavior of Appian objects & dictionaries is that there really is no concept of order among the keys. If you need a particular order, I'd recommend using a different data structure than just dictionary.
Is it expected that createdictionary would return the resulting dictionary list in the order of the provided keys? For example createdictionary( keys: { today(), today()-1,...}, values: { 0, 0,.. } ) , depending on the number of days added to keys and values the order appears to be nondeterministic.
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!
expandCdt 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!
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'
Hi,
I am trying to expand my CDT using expandcdt() function. It is given that the expand field parameter accepts input in "???function.expandcdt.param.expandField.description???" format. I am unable to figure out the input.
My CDT structure looks something like below,
empId: ""
empDepartment: Department(nested CDT)
dId:
dName: ""
empGender: Gender(nested CDT)
gId:
gName: ""
lastName: ""
firstName: ""
Could you please help me with an example.
Thanks in advance.