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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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,173)