Looking for help with a form I have where the backend is a SharePoint list.
What I’d like is for the top dropdown to filter the list and show all results per filter. This I figured out.
For the other dropdowns I’d like to filter the list based on each selection using the button. What I’m running into is the choices end up being “and” statements so if a select Yes for one and No for another it removes the results with Yes. You end up having to have the right combination of Yes/No choices to show a result. I’d like the filtering to be similar to how you would filter a column in SharePoint or Excel if that makes sense.
Anyone have ideas on how to get this to work? Am I going about this incorrectly?
figured it out, using choice fields instead and disabled multi select.
@Shanescows do you think you can help with this?
Is it possible to add a blank value to the dropdowns I'm getting from SPO? I'm trying to filter like you would in SharePoint, thus selecting yes or no or nothing, to return results. However, I need help adding a blank value that doesn't live in SharePoint.
Filter(
'SPO_List',
SPOcolumn = columnSelector.SelectedText.Value,
SPOcolumn1 = column1dropdown.SelectedText.Value,
SPOcolumn2 = column2Dropdown.SelectedText.Value,
SPOcolumn3 = column3Dropdown.SelectedText.Value,
SPOcolumn4 = column4Dropdown.SelectedText.Value,
)
Is it possible to add a blank value to the dropdown?
Filter(
'SPO_List',
SPOcolumn = columnSelector.SelectedText.Value,
SPOcolumn1 = column1dropdown.SelectedText.Value,
SPOcolumn2 = column2Dropdown.SelectedText.Value,
SPOcolumn3 = column3Dropdown.SelectedText.Value,
SPOcolumn4 = column4Dropdown.SelectedText.Value,
)
Maybe it would be better to mimic SharePoint thus introducing the following filter options that way I can have an unselected option which is what I need.
@mdevaney thank you for your help so far, yes that's what I have, however because the drop down values are either yes or no which I pull from the SharePoint list columns I have no method to add a blank value in any of the drop-downs. Any idea how I would do that? If I had an empty value I think the query would just ignore it right?
There are two ways to do use and OR clause within FILTER. See examples below.
#1
Filter(
your_datasource_name,
field1 = "someValue1" || field2 = "someValue2" || field3 = "someValue3"
)
#2
Filter(
your_datasource_name,
Or(field1 = "someValue1", field2 = "someValue2", field3 = "someValue3")
)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
@mdevaney, yes that's the issue, I'd rather the and statement be "or" statements, that way I can keep the record displayed without having an exact match in values. Not sure how to do that, when I replace "," with or it doesn't support it.
The FILTER function allows you check multiple conditions separated by a comma. All of the criteria must be met to return a result so the effect is the same as using AND.
Filter(
your_datasource_name,
field1 = "someValue1",
field2 = "someValue2",
field3 = "someValue3"
)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional