cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Conditional combinaison of Filter and Search record on login

Good morning

 

I have an timesheet app based on an excel sheet. After login to office365, they can add, edit or delete their time of work. I want to filter record directly on the app oppening depending of the user. At the same time, I wish I can use the search function.

Something like this: 

 

SortByColumns(
Search(
Filter(TableauActivites;If(User().FullName="SCM ARCA";all records;InfirmierAnesthesiste=User().FullName))
; TextSearchBox1.Text;"InfirmierAnesthesiste";"Activite");"DateActivite";
If(SortDescending1; Descending; Ascending))

 

or this

SortByColumns(
    If(
        User().FullName="SCM ARCA";
        Search(TableauActivites; TextSearchBox1.Text;"InfirmierAnesthesiste";"Activite");
        Search(
            Filter(
                TableauActivites;InfirmierAnesthesiste=User().FullName;TextSearchBox1.Text;"Activite")));
                "DateActivite";If(SortDescending1; Descending; Ascending)

 

What is the correct way to do that ?

Thanks a lot.

1 REPLY 1
Highlighted
Helper I
Helper I

Re: Conditional combinaison of Filter and Search record on login

This is working but may be there is something easier ?

 

If(User().FullName="SCM ARCA";
SortByColumns(
    Search(TableauActivites; TextSearchBox1.Text;"InfirmierAnesthesiste";"Activite");"DateActivite";
    If(SortDescending1; Descending; Ascending));
SortByColumns(
    Search(
        Filter(TableauActivites;InfirmierAnesthesiste="Fabien DUFAILLY");TextSearchBox1.Text;"Activite");"DateActivite";
        If(SortDescending1; Descending; Ascending)))

Thank you...

 

 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,246)