I got users that has 3 Entries fields in their profile: breadForMonday, breadForWednesday and breadForFriday.
I want to differentiate between users with 1, 2 or 3 selected entries. How would I use relatedTo together with and/or and :empty/:notempty?
Something like this:
{% set bread = craft.entries({ section: 'bread' }).limit(null) %}
{# Find users that have selected entries for two out of three fields #}
{% set users = craft.users({
group: 'customers',
relatedTo: [
'and',
{ targetElement: bread, field: 'breadForMonday' },
{ targetElement: bread, field: 'breadForWednesday' }
]
}) %}