Filter based on multiple columns
Good day,
Is it possible to filter a view based on different columns, e.g. we have columns 'Status', 'Country', 'Name', so I want to get the filtered table when (Status='Open' OR 'Closed' ) OR (Country = 'Germany') OR 'Name = empty.
It looks like the filtering could be based on the AND condition only with each new filtering being done on the filtered data.
Many thanks,
Eka
10 replies
-
eka
I have a daybook veiw that fikteres my daybook for
a status of proof or dispatched
how I achieved this is to go to edit cols in the view
add a formula - added Status = 1 or Status = 3 to the forumula ( using the number of the choice filed not the name ie proof is option 1 etc.
results are
the formula field is shown in postion 1 - but you can move it over out of the way
-
Thank you so much for the response! My issue, though, is that I need to filter based on several columns using OR condition...
-
see if ther is anything in these 2 threads that might help
-
Thank you, Mel. No, unfortunately, in all links they talk only about the one field-based filtering.
-
Hi eka -
To filter a table view on multiple fields with an or condition can not be done without another field, like Mel's first comment. So you could do something like this in a formula field:
if field1 = 1 or field2 = 1 then 1 end
Then you would add the field to your table view then filter for 1.
-
Thank you for the response! I realized that I didn't mention the important part. The field I refer to is in one table while others are in the linked table. The error I am getting - End expected: OR at line 1. It looks like the formula doesn't work for the linked tables.
-
Hi eka -
Sorry I didn't read your first post. Your code could look like:
if Status = "Open" or Status = "Closed" or Country = "Germany" or Name = null then 1 end
That is assuming none of the fields are choice field.
-
Then you would just add the reference field name before the field. So if Name is in a table called People and the reference field in your current table is also called People then:
if Status = "Open" or Status = "Closed" or Country = "Germany" or People.Name = null then 1 end
-
Resolved. Thank you, Fred! I also noticed that the 'OR' operator doesn't work while 'or' does.
-
Yes, Ninox is case sensitive with its commands. It is always lowercase.
Glad things are working.
Content aside
- 2 yrs agoLast active
- 10Replies
- 277Views