Can we add an attribute and variable to an existing list or array with Update Data

I am building a few different arrays to be able to effectively use the convert a string value to a typed value.

Is it possible that if I create a collection or a new array of 10 records, that I could add to that existing list and add an 11th record with an Update Data object?

Thank you.

1 Like

Hi AlonsoM,

Someday we'll add functions for that. In the meantime there's a trick but it only works for string collections.
There's a trick to do it but it only works for string collections. Assuming you have already create Flow.MyStrColl:

Append(ToString(Flow.MyStrColl,"|"),"|newItem").Split("|")

This would add the string "newItem" to the end of the collection. This works by writing out the current list of items separated by the delimiter "|", adding "|newItem" to the end of the string, then reading the string back in as a collection, splitting on the same delimiter. You can choose a different delimiter than | if you need to; it's also not limited to a single character. One other caveat: doing this will lose whether an item in the collection was NOT_SET vs an empty string.

You could also add the new item as the beginning of the list like so.

Append(,"newItem|", ToString(Flow.MyStrColl,"|")).Split("|")

Thank you for this response.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.