Assume I have an Appian common data type (CDT) called myTask
which contains multiple fields taskName
, taskQuarter
, taskYear
, taskId
saved in a local variable (of an Interface) which looks for instance as follows
+ data (List of dictionary)
+ (Dictionary)
- taskName: "Plant trees." (Text)
- taskQuarter: 1 (Number (Integer))
- taskYear: 2020 (Number (Integer))
- taskId: 0 (Number (Integer))
+ (Dictionary)
- taskName: "Cut leaves." (Text)
- taskQuarter: 2 (Number (Integer))
- taskYear: 2020 (Number (Integer))
- taskId: 1 (Number (Integer))
In the local scope (of the interface), I would like to have an additional field for all records called taskLongName
which would be the following concatenation (in pseudocode):
taskLongName = taskName + " " + taskYear + " Q" + taskQuarter
How do I do that, please?
It turned out to be rather simple: Assuming that you have an expression rule
myGetAllTasks()
defined, you could put the initial list of dictionaries intolocal!allTasks
. Next, we use Appian'sa!forEach()
function: