I have the below formula on my gallery which mostly works. I have 2 comboboxes and 1 text input box.
Goal: filter the gallery based on selections in either of the comboboxes or text input box. The formula works when the comboboxes and text input box are empty (it returns the list in its entirely). Additionally, the gallery will filter when text is in the text input box. However, my issue comes when making a selection in a combo box - the gallery will not filter.
Additional Info: I have a clear selections button that OnSelect resets all the comboboxes and text box. Upon clicking it successfully removes the selection. Not sure if this is causing an issue as it resets.
If(IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems)),'Standards, Disclaimers & Disclosures', Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in ComboBox1.SelectedItems.Result || 'Subject Matter or Content Topic(s)' in ComboBox2.SelectedItems.Result || TextInput1.Text in 'Required Language'))
Solved! Go to Solution.
Hi @enlitzinger ,
Sorry for my bad, I miss a ')' in the code, please try this:
Filter(
'Standards, Disclaimers & Disclosures',
If(IsEmpty(ComboBox1.SelectedItems),true, 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",")) ||
If(IsEmpty(ComboBox2.SelectedItems),true, 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",")) ||
If(IsBlank((TextInput1),true, TextInput1.Text in 'Required Language')
)
Hope this helps,
Sik
Hi @enlitzinger ,
try this:
If(IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems)),'Standards, Disclaimers & Disclosures', Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",") || 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",") || TextInput1.Text in 'Required Language'))
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,Thanks @KrishnaV for the help but that formula is only working when all 3 (2 comboboxes and text input) have values in them. It would be ideal to have them work when only 1 has values and the other 2 are blank. Any advice?
Hi @enlitzinger ,
Try this:
If(IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems)),'Standards, Disclaimers & Disclosures',
If((!IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems))) || (!IsBlank((TextInput1) && !IsEmpty(ComboBox1.SelectedItems) && !IsEmpty(ComboBox2.SelectedItems))),
Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",") || 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",") || TextInput1.Text in 'Required Language'))
)
Regards,
Krishna
Proud to be a Super User!
Regards,Hi @enlitzinger ,
The above formula works, if all are blank or text is not blank and combo boxes are blank.
Proud to be a Super User!
Regards,@KrishnaV, regrettably same result as before. Only working when both comboboxes and textinput have values within.
Hi @enlitzinger ,
Please try this on
Filter(
'Standards, Disclaimers & Disclosures',
If(IsEmpty(ComboBox1.SelectedItems),true, 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",")) ||
If(IsEmpty(ComboBox2.SelectedItems),true, 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",")) ||
If(IsBlank((TextInput1),true, TextInput1.Text in 'Required Language'
)
Hope this helps.
Sik
Regrettably receiving an error related to the last part of the formula:
||
If(IsBlank((TextInput1),true, TextInput1.Text in 'Required Language'
)
It's stating 'an invalid number of arguments. Received 3 expected 1.
Hi @enlitzinger ,
Sorry for my bad, I miss a ')' in the code, please try this:
Filter(
'Standards, Disclaimers & Disclosures',
If(IsEmpty(ComboBox1.SelectedItems),true, 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",")) ||
If(IsEmpty(ComboBox2.SelectedItems),true, 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",")) ||
If(IsBlank((TextInput1),true, TextInput1.Text in 'Required Language')
)
Hope this helps,
Sik
Hi @enlitzinger ,
I just want to follow up with you on this issue to see is it resolved or still you see any challenges.
If you see any challenge/need further help let me know I am always happy to help.
Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more
Proud to be a Super User!
Regards,User | Count |
---|---|
184 | |
124 | |
89 | |
45 | |
43 |
User | Count |
---|---|
262 | |
160 | |
128 | |
81 | |
73 |