Great question, I’m genuinely surprised that I don’t think this use case has actually come up, there doesn’t seem like an easy way to achieve this. I think this is probably just a limitation of filtering with query parameters where you can’t get fancy with logic. You can filter your query based on up to three custom field values using query parameters like custom_field_value_2
and custom_field_value_3
, but it doesn’t seem like that gives you a way to say “show me results that have this value OR this value OR this value.”
When you’re filtering a loop based on multiple taxonomy terms, there’s a parameter called taxonomy_relation
that you can set to and
or or
, but it doesn’t seem like there’s an equivalent like custom_field_relation
to achieve what you’re trying to do here. I’ll pass that along as a feature request. If that’s not possible, I’m sure we should at least be able to set up a field_relation
attribute for the loop tag. Maybe both.
I think the current solution to this would involve first stacking several If
statements (maybe using a logic variable since that might be more compact) while setting any=true
. Then if that logic variable is true, you could just create a basic type=wcrm_ticket_activity
loop and then within the loop, filter it based on multiple conditions (again, maybe through another logic variable).
This seems oddly hacky though, so I’ll pass this by someone more experienced on the team to see if I’m just not caffeinated enough yet and I’m missing something obvious. If not, I’ll be sure to create a feature request since this is definitely the kind of thing that L&L should be able to accomplish more easily.