Hi there.
Quick question here?
I currently have my gallery and is working fine. As you can see I can filter my gallery based in my dropdowns selection or my Radio1 selection.
Now As a default I have my Radio1 "Condo" so my gallery always is filtered with that condition.
I would like to have my gallery to show all of the items "Condo", House", "Comm". I I would like to filter my gallery if I select a City, a State and now a type.
but I could find the way to change my current formula.
Could someone please point me in the right direction?
Search( Filter( Market, (CboState.Selected.Result = Blank() || State = CboState.Selected.Result) && (CboCity.Selected.Result = Blank() || City = CboCity.Selected.Result)&& (CboZipCode.Selected.Result = Blank())), (Type = Radio1.Selected.Value)),TextSearchBox1.Text,"Name")
Thanks in advance
Solved! Go to Solution.
Hi @sajarac ,
Where is the error referring to - I was simply using the values you posted as I cannot see your data. If it is zipcode, you need
Search(
Filter(
Market,
(
Len(CboState.Selected.Result) = 0 ||
State= CboState.Selected.Result
) &&
(
Len(CboCity.Selected.Result) = 0 ||
City = CboCity.Selected.Result
) &&
(
Len(CboZipCode.Selected.Result) = 0 ||
ZipCode = Value(CboZipCode.Selected.Result)
) &&
Type = Radiol.Selected.Value
),
TextSearchBoxl.Text,
"Name"
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @sajarac ,
Try this
Search(
Filter(
Market,
(
Len(CboState.Selected.Result) = 0 ||
State= CboState.Selected.Result
) &&
(
Len(CboCity.Selected.Result) = 0 ||
City = CboCity.Selected.Result
) &&
(
Len(CboZipCode.Selected.Result) = 0 ||
ZipCode = CboZipCode.Selected.Result
) &&
Type = Radiol.Selected.Value
),
TextSearchBoxl.Text,
"Name"
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @WarrenBelz , thanks for your help.
That formula gives me :
Invalid argument type (number). Expecting a Text value instead.
I have added to my Radio the "All" choice. Would this make things easier?
Hi @sajarac ,
Where is the error referring to - I was simply using the values you posted as I cannot see your data. If it is zipcode, you need
Search(
Filter(
Market,
(
Len(CboState.Selected.Result) = 0 ||
State= CboState.Selected.Result
) &&
(
Len(CboCity.Selected.Result) = 0 ||
City = CboCity.Selected.Result
) &&
(
Len(CboZipCode.Selected.Result) = 0 ||
ZipCode = Value(CboZipCode.Selected.Result)
) &&
Type = Radiol.Selected.Value
),
TextSearchBoxl.Text,
"Name"
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @WarrenBelz , please apologize. I didn't explain correctly.
What I want is to be able to see the items in my gallery and be able to filter the gallery based in either
City or State, Zip or Type.
Hi @sajarac ,
When you refer to "either", the code I supplied will filter on all of them (if they have a value in the searching control) - is this what you are wanting?
Hi @WarrenBelz, for some reason I can not get both formulas working. I am getting errors.
After several attempts I have partially this formula working. I mean partially because if I have selected in my Radio1 the option "All" my gallery shows "All" and I am able to also filter the gallery by state and/or city and Zipcode.
But the TextSearchBox is not working.
If(Radio1.Selected.Value = "All",
Search(
Filter(
Market,
(CboState.Selected.Result = Blank() || State = CboState.Selected.Result) && (CboCity.Selected.Result = Blank() || City = CboCity.Selected.Result) &&
(CboZipCode.Selected.Result = Blank() || ZipCorrected = Text(CboZipCode.Selected.Result) ||
Type = Radio1.Selected.Value)),TextSearchBox1.Text,"Name"),
Search(
Filter(
Market,
(CboState.Selected.Result = Blank() || State = CboState.Selected.Result) &&
(CboCity.Selected.Result = Blank() || City = CboCity.Selected.Result) &&
(CboZipCode.Selected.Result = Blank() || ZipCorrected = Text(CboZipCode.Selected.Result)),
(Type = Radio1.Selected.Value)),TextSearchBox1.Text,"Name"))
PS/ Never mind, TextSearch is working fine. I am testing behavior. I will let you know.
Thank you very much for your help.
Regards