Hello,
Is there a way in appian where I can search a list of dictionaries for any item in that list that meets a specific set of properties
For example, say I have the following list:
{{storeNum: "003", taskCode: "A", numOfTasks: 1292},
{storeNum: "003", taskCode: "B", numOfTasks: 5},
{storeNum: "003", taskCode: "C", numOfTasks: 8},
{storeNum: "003", taskCode: "D", numOfTasks: 5},
{storeNum: "004", taskCode: "A", numOfTasks: 208},
{storeNum: "004", taskCode: "C", numOfTasks: 2}}
Now, I want a function, that when I feed it a storeNum and taskCode, to return to me the numOfTasks if it exists in the list, and returns 0 (or any indication) when no dictionary items with the specified combination of storeNum and taskCode exists in the list.
for example, if I call function(storeNum: "003", taskCode:"A") it will return 1292
However, if I call function(storeNum: "004", taskCode:"B") it will return 0
Is there something like this, or similar? I am struggling to wrap my head around how list comprehension works in appian.
thank you,
Discussion posts and replies are publicly visible