cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,029)