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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (6,314)