Multiple delimited strings in the value field of a manual source for a table filter

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have a field that has 3 values: A, B, A & B.

I would like to create a table filter that had two labels, A , B.

However, I'd like to make the value  be A; A & B

This would mean that if users selected A, they would get all the records with either A or A & B. If they selected B, they would get B and A & B

Any way to do that? There a specific delimiter I could use?
Photo of Santiago Perez

Santiago Perez

  • 362 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Have you looked at condition logic? Seems like you could use a combination of condition logic and filterable default off conditions to accomplish this.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Santiago here is one way you can do this. 

Create 2 conditions on your model.  
- Both should be "filterable default off".  
- One should be records where field = A or A&B.
- The other should be records where field = B or A&B.  (Look for Value tab - Content property - Select: Multiple speicified values).  
- Give each condition a reasonable name,  like A and B. 

Then create a filter control.
- Type = Select Option.  
- Pick Options and Conditions = Manually 
- Model Condition = none
- Create None Seelcted Option = unchekced. 

Add one option source of type "Manual"  and give it 3 options. 
- Each option should "affect other conditions" and you should add 2 effect lines below each option. 
- The first option should be labled "All Records" and it should deactivate both conditions
- The second option should be labled "A records" and it should activate condition A and deactivate condition B
- The thrid option should be labeled "B records"  and should be the opposite. 

That should do what you are looking for... 
Photo of Santiago Perez

Santiago Perez

  • 362 Points 250 badge 2x thumb
Thanks Rob, I gave that a try, but my table is now blank whenever I apply that filter. One possible reason is that each of the effects where I am activating a condition is asking me to define a single value. I left the value field blank, since it seems to me that would undo the work done when creating the two conditions.

Another possibility is that in the conditions, I entered the two values A and A & B as separate items, was I supposed to type "A or A & B" into a single value and delimit them somehow?

Let me know what other information I can provide
(Edited)
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Santiago,

You should specify the values for your conditions when you set up the condition. Then on your filter, instead of choosing the "Activate and Set Value" option, just choose "Activate."
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Let's flesh out Matts post a little. 

The conditions should select multiple values.  In the  Value tab of the condition builder look for the "Content" property and Select: Multiple speicified values. 

Then you can simply activate and de-activate the conditions and you don't need to send values. 

That should work... 
Photo of Santiago Perez

Santiago Perez

  • 362 Points 250 badge 2x thumb
Thanks Matt, that was the issue. Setting the effect to "Activate" instead of "Activate and Set Value" fixed the issue.

Thanks everyone!