cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JimNoredlac
Level: Powered On

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
JimNoredlac
Level: Powered On

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,145)