Just want to check my understanding. I’m triggering a workflow based on counting how many things are in a list. My first conditional took the form
When: List of data type/field (another data type)/count=1
Concrete example:
When: List of users/driving licence/count=1
I expected this conditional to count the number of driving licences in the list of users but it didn’t it counted the number of driving licence fields (which is the same as the number of users), or more specifically it counted “driving licences” whether the field was empty or not.
What worked was
When: List of data type/field (another data type)/is not empty/count=1
Is this as it should be?
Hey @shane.holohan1
Thanks for reaching out and great question. The best way to do this might be to include the constraint in your search for user’s. As a result, your search might be users, who’s license is not empty. And, your dynamic expression would be users:count.
If you aren’t performing a search, you could accomplish something similar with :filtered where you input the constraint ‘license is not empty’ and then count the result. For this, your dynamic expression would be something like users:filtered:count.
Give it a try and feel free to reach out to us directly with any additional questions at Support@Bubble.io.
Hi @Andrew.Vernon
Thanks for that. I’ve done as you suggested (filtering rather than searching) and it works as expected. My confusion came in part from the tooltip on the formula. I’ve attached a screenshot. You’ll see Current User’s MySurveys’s MyProfile:Count which the tooltip says evaluates to a list of MyProfiles which are then counted but in fact it doesn’t - it counts the number of MySurveys unless you include “is not empty” ie - Current User’s MySurveys’s MyProfile:is not empty:Count. This does count the number of MyProfiles
Might be worth looking at the tooltip in such a case to make that clear for other users.
Thanks
Shane
