Within Visual Workflow ("flow"), I need to evaluate whether an sObject Collection Variable contains any record Ids. I.e., is the sObject Collection Variable null or 'empty'?
If the sObject Collection Variable is null or empty, I simply route the user to a nice screen with additional instructions rather than letting them proceed through the flow to receive errors later.
Using a Decision element, I am evaluating the sObject Collection Variable using Operator "Is Null" and the value: {!$GlobalConstant.True} or {!$GlobalConstant.False}.
When evaluting and sObject Collection Variable, the only operators available are: Equals, Not Equals, Is Null, Contains. When you choose Equals or Not Equal, you cannot leave the Value field blank to check for empty string, you have to provide another sObject Collection Variable to compare against. Also, the global constant "Empty String" is not available when evaluating an sObject Collection Variable so I believe i'm forced to use Is Null as the operator.
I use a screen with an Output Text to display the contents of the sObject Collection Variable and when it is empty (contains no record Ids), it displays "[]" (left and right square brackets) where if it were populated with record Ids, the Ids would appear within the brackets. So my guess is that sObject Collection Variable is not Null because the brackets are displayed in the output of an empty variable so my decision element is working correctly because the sObject Collection Variable is "not null".
Any other suggestions out there for evaluating sObject Collection Variable contents?