Skip to main content

Hi all!

Has anyone else encountered issues checking for null values after a 'Collection Filter' element? Some use cases that don't quite work correctly for me

Situation 1:

I use a get records element to retrieve 13 accounts. I then use a Collection Filter element to further constrict the data, causing the resulting collection to be null. Using something like {Collection} is null True will never resolve correctly.

Situation 2 (the more surprising one to me):

I use a get records element to retrieve 0 accounts. I then use a Collection Filter element to further constrict the data, meaning both the source and target collections are now null. However, {Collection} is null True only resolves correctly on the first (original) collection, never the second!

 

In debug, I can see that the collection filter adds an additional set of square brackets in the braces (which doesn't seem to be recognized as null further down the line).

 

Why are filtered collections in flow never truly 'null'?

3 respuestas
  1. Andrew Russo (BACA Systems) Forum Ambassador
    27 dic 2022, 15:44

    this is a viable work arround but i agree with you it is dumb that it puts the brackets there and is null doesnt work...

     

    make an extra collection filter that will always result in being empty. for me i did a filter to say account name is blank... since account name will never be blank then i checked if my real collection filter equaled my always empty one. if so then i know it was empty. 

     

    this is a viable work arround but i agree with you it is dumb that it puts the brackets there and is null doesnt work... make an extra collection filter that will always result in being empty.

    Screen Shot 2022-12-27 at 10.44.21 AM.png

     

    Screen Shot 2022-12-27 at 10.44.26 AM.png

0/9000