Text Collection / Flow: How to compare a collection resource with null in flow or validate file upload in flow - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Nick KuppensNick Kuppens 

Text Collection / Flow: How to compare a collection resource with null in flow or validate file upload in flow

Hi all, 

I'm trying to validate in a flow, if an user really uploaded in file while they go to the end of the flow. 
Neither working with the operator "is null" if providing me with the result I'm aiming for.

Descision elements is configured as following:
User-added image
  • FileNames contains the names of the files in a text collection variable
  • IDsFiles contains the ID's of the files in a text collection variable

A couple of examples from the debug log.
1) When a file is uploaded
User-added image
2) When no files are uploaded
User-added image


In my understaning the second example should exectue the "No_Files" outcome. 

Could someone help me out how I should proceed?

Thanks!!
Jayson MoralesJayson Morales
Hi Nick,

Sorry for the inconvenience. In case you don't receive a response here, may I also suggest joining the developer forums below to collaborate with the experts for best practice and advice.

https://developer.salesforce.com/forums
https://salesforce.stackexchange.com/

Hope that helps.


Regards,
Jayson
Nishtha SoodNishtha Sood
Hi Nick,

Were you able to fix this issue? I was thinking of same solution and came across this question already posted here.

Thanks!
Adam WhiteAdam White
You can assign the collection to a number, then use the decision to check if the count is greater than 0 - thats usually what I do for 'empty collections'