I have a gallery with a sharepoint list as the data source.
The sharepoint list has 2 columns, coumn1 and column2.
There is always a value in column1, but only sometimes a value in column2.
The gallery needs to be filtered using a variable named varA.
Column1 should be filtered by varA, except if column2 is not blank, then it should ignore column1 and try match column2 to varA.
Currently, this is what I have:
Filter(DataSource, column1= varA || column2= varA).
The problem I am facing, is that when varA matches the value in column1, but there is a value in column2, that row is still displayed. I need to only see rows where if column2 is blank, then it matches column1, but if column2 is not blank, then it will always ignore the value in column1.
Copilot is no help, although it does provide solutions that make sense in theory, they don't apply in practice.