AlonsoM | 2017-12-08 18:30:34 UTC | #1
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.
MelissaBailey | 2017-12-15 20:51:26 UTC | #2
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("|")
AlonsoM | 2017-12-15 20:58:12 UTC | #3
Thank you for this response.
system | 2018-01-15 20:58:19 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2213