I have built a toggle filter on a table on a field entitled “Buyer”. “Buyer” is a lookup to the user object. I want to show when the running user Id is in the buyer field and when the field is blank. the goal is when filter is enabled it will show the running user records and the blank records.
The conditions on the model:
1st condition: Buyer field is = running user id, default off filterable
2nd condition: Buyer field is = blank, default off filterable
Toggle Conditions: Activate the two above conditions
When I add one condition to the toggle filter it works. When I add both filters it breaks. Has anyone run into this?
wouldn’t you want 1 condition where buyer field is either user id OR blank instead of two separate conflicting conditions. Activating these two conditions simultaneously would cause them to fight, wouldn’t it? Condition 1 would filter out blanks and condition 2 would filter out user id so the result would be 0 records.
I tried doing it in one condition as well and that didn’t work.
I created a new model entitled “RunningUser” for the user record. Set a condition to Id=User Id of running user, always on
I set the condition on the model that have my buyer field to multiple specific values. I left the first value blank and set the second value to {{$Model.RunningUser.data.0.Id}}
I activated this one condition in my toggle filter. It yielded no results.
I think this answer is pretty simple.
Add grouping logic to your conditions with an OR statement between the 2 conditions you are using in your toggle fitler. That will make records that are returned by either condition show up in your list.
Just note that your Grouping Logic statement needs to include all conditions - even those that are “filterable default off”
Thank you Rob! knew it was something simple. I tried everything except the condition grouping. Hopefully this will help someone else.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.