0

I have built a Screen Flow which has an upload file component, which I have limited to one file per Flow process.

The output of this component is called "Content Document IDs" and required to be stored in a Text Collection Variable, which effectively is an Array of the uploaded file Id's.

enter image description here

The problem is that although the collection variable is only returning one Id, I cannot access it, as it returns the value as an array - [xxxxxxxxxxxxxx]

enter image description here

UPDATE: As the formula is returning the ID as an Array - [xxxxxxxxxxx] I have removed the brackets, leaving just the Id...

SUBSTITUTE(SUBSTITUTE({!DocumentIds},'[',''),']','')

Is this the only way to do this? It seems a bit fiddly??

3
  • We never got to see the formula... how would we know what was wrong to begin with? – sfdcfox Jun 5 '19 at 2:44
  • Fair point! I've updated the question/update to be a bit more helpful to others. – TheMikeyBoosh Jun 5 '19 at 3:14
  • 1
    The "official" way would involve using a loop/assignment pair, but that really seems like overkill. I actually think the formula is a lot easier, if not a bit "fiddly". – sfdcfox Jun 5 '19 at 3:26
0

As mentioned by sfdcfox in the comments section, using a loop/assignment is the "proper" way to dissect the array into the individual Ids. The following link supports a similar scenario:

https://success.salesforce.com/answers?id=9063A000000DX3nQAG

That being said, using a formula to remove the array brackets also works...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.