Custom made filter question

Hello! I have created this filter with expressions, using ANY:
Usage: On “Data” the user set the desired date, and on the SVC, its meant to be the user.

Everything is working, filtering DATE and USER… But i want to add “Show All”, so its going to show all entries… I have added on the SVC Enum an option called “Show All”.

My question is: on the expression assistant (picture below), what condition i have to add? I am using the AND () expression.

Another question: If i select the option “Show All” is it possible to “remove” the filter temporarily? (Just when the option is selected).


Some translations:

Usuário = User
Filtro = Filter
Data = Date

SVC its the like “User”

Thanks!

IF( ANY(Filtro[SVC] )="Show all", TRUE,
AND([Data]=ANY(Filtro[Data] ),
[Usuário]= ANY(Filtro[Data] ))
)

Please try something like above. However please note the option “Show All” will show the entire data to all users.

2 Likes

Hello Suvrutt! Thank you for your fast answer… Its meant to show all data, this app is a management version of the original one, so only one person will access it.

About the filter, its giving me this error:
Note: “Todos” means Show All… And i have added it to my Enum only on appsheet, its not on the table yet. Is it possible to reffer to it “virtually”?
image

Oh sorry. There was a small syntax error. I have updated in the post above. Could you try the revised expression.

2 Likes

It worked perfectly! Thank you very much Suvrutt, appreciate your help.

2 Likes

Alternatively, you could try

OR( 
ANY(Filtro[SVC] )="Show all" , 
AND(
[Data]=ANY(Filtro[Data] ),
[Usuário]= ANY(Filtro[Data] )
)
)
2 Likes

Another quick question, if i want to filter couple users, how can i achieve this?

Example: Group1 will have User1, User2 and User3 only.

If i check the box Group1, it will show only the users the group have.

Is it possible to implement this on that function?

Its important to me to have these groups with respective users

It will really depend on how your app is configured. One option to take a look at is dependent dropdowns.

https://www.appsheet.com/samples/How-to-create-a-dropdown-menu-with-values-that-depend-on-earlier-choices?appGuidString=f9584a6f-935d-48e6-85ec-050b85b93aea

Its the same way you helped me, but instead of showing All entries, show only a few users (like 4).

It can be done?

Yes, it is possible. Could you please take a look at the suggested articles, sample app.

1 Like

Ive looked it again, i tried with these valid if before, but i cannot figure out, i think the dependant dropdown dont work in my case… maybe i should add another condition to this formula:

Im just speculating, because im new to this xD

IF( ANY(Filtro[SVC] )="Show all", TRUE,
AND([Data]=ANY(Filtro[Data] ),
[Usuário]= ANY(Filtro[Data] ))
)

As I mentioned , the configuration and approach will depend on your app data schema and other confuguration. May I sugegst you to start a new thread with more details on how you have grouped users etc.

1 Like

Ok i will do it