Hi
I'm trying to filter a Gallery based on 2 different values in a SharePoint List. Filtering One is easy (Filter(TableName,ColumnName=Dropdown1.Selected.Value)
But, I would like to show content where the "ProjectName" = XXX and the "ProjectPhase"= YYY. Both X and Y is in the same SharePoint-list.
I've tried & && . and ! without any results....
Any good ideas or solutions?
Solved! Go to Solution.
You can use either && or "And" function, for example:
Filter(Assets, InService=true && AssetType="Tablet") or Filter(Assets, And(InService=true, AssetType="Tablet"))
No need to quote the column names, intellisese adds simple quotes if there are spaces
In addition to what LauraOnu suggested, you can also pass more parameters to the Filter function, and they will be combined as if they were passed to the And function, like in the example below.
Filter(TableName, ColumnName = Dropdown1.Selected.Value, ProjectName = "XXX", ProjectPhase = "YYY")
You can use either && or "And" function, for example:
Filter(Assets, InService=true && AssetType="Tablet") or Filter(Assets, And(InService=true, AssetType="Tablet"))
No need to quote the column names, intellisese adds simple quotes if there are spaces
In addition to what LauraOnu suggested, you can also pass more parameters to the Filter function, and they will be combined as if they were passed to the And function, like in the example below.
Filter(TableName, ColumnName = Dropdown1.Selected.Value, ProjectName = "XXX", ProjectPhase = "YYY")
Thanks, I went for this and it worked perfect! Great fun!
And what about using "OR" instead of "AND", lets say a want to filter by two conditions, but not both condicitons have to be true, only one of them.
Any clue?
You can use the Or operator or the || which is the equivalent.
Check out the operators here at this document.
Basic building blocks:
And &&
Or ||
Not !
User | Count |
---|---|
247 | |
105 | |
82 | |
50 | |
42 |