web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering on "Visible"...
Power Apps
Unanswered

Filtering on "Visible" by multiple conditions

(0) ShareShare
ReportReport
Posted on by

Hello All,

 

I have created a back-end Admin Page for a training request Portal, 2 portals total, where Admins can see and edit the requests. Within the admin page I have Tabs for different things the Admins can look through for each request.

 

Tabs filter.PNG

 

Each tabs contents has on "Visible" a code for things to popup only when that tab is enabled. With there being no Restriction on who can view each request (So nobody can view requests that aren't theirs) I made it to where content only appeared when User().FullName was in the "Person of Contact" field. That was if they have nothing to do with this request, no content will appear. There are also a few others I have to let have full access so I also included code for the content to always appear for them. Code:

 

TrainingDataTab_1.DisplayMode = Disabled &&

If(Facilitator1.Text = User().FullName, true) ||
If(Facilitator2.Text = User().FullName, true) ||
If(Facilitator3.Text = User().FullName, true) ||
If(Facilitator4.Text = User().FullName, true) ||
If(Facilitator5.Text = User().FullName, true) ||
If(Facilitator6.Text = User().FullName, true) &&
If(MonosMAccess.Text = User().Email, true) ||
If(MonosAAccess.Text = User().Email, true) ||
If(RhanniesMAccess.Text = User().Email, true) ||
If(RhanniesAAccess.Text = User().Email, true) ||
If('James''MAccess'.Text = User().Email, true) ||
If('James''AAccess'.Text = User().Email, true) ||
If(MonitorAccess.Text = User().Email, true)

 

When I put in all the filters/requirements for content to appear it seams as if the first  bit of code stops working. Not all requirements working

for example: TrainingDataTab_1.DisplayMode = Disabled

 

Should make all the content be only viewable in the "Training Data Tab", but when I include all the other requirements it stops working and all of the tabs content will appear on the other tabs as well.

 

This code worked perfect:

TrainingDataTab_1.DisplayMode = Disabled &&

If(Facilitator1.Text = User().FullName, true) ||
If(Facilitator2.Text = User().FullName, true) ||
If(Facilitator3.Text = User().FullName, true) ||
If(Facilitator4.Text = User().FullName, true) ||
If(Facilitator5.Text = User().FullName, true) ||
If(Facilitator6.Text = User().FullName, true)

 

Its when I added the rest did it start to mess up.

 

Any help would be appreciated,

Thanks

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at
    Re: Filtering on "Visible" by multiple conditions

    @Anonymous 

    I think its just a matter of placing some brackets around the OR statements.

     

    TrainingDataTab_1.DisplayMode = Disabled &&
    If(Facilitator6.Text = User().FullName, true) &&
    (
    If(Facilitator1.Text = User().FullName, true) ||
    If(Facilitator2.Text = User().FullName, true) ||
    If(Facilitator3.Text = User().FullName, true) ||
    If(Facilitator4.Text = User().FullName, true) ||
    If(Facilitator5.Text = User().FullName, true) ||
    If(MonosMAccess.Text = User().Email, true) ||
    If(MonosAAccess.Text = User().Email, true) ||
    If(RhanniesMAccess.Text = User().Email, true) ||
    If(RhanniesAAccess.Text = User().Email, true) ||
    If('James''MAccess'.Text = User().Email, true) ||
    If('James''AAccess'.Text = User().Email, true) ||
    If(MonitorAccess.Text = User().Email, true)
    )

     

    Also, you could rewrite the code to b  more concise like this 🙂

    TrainingDataTab_1.DisplayMode = Disabled &&
    Facilitator6.Text = User().FullName &&
    (
    Facilitator1.Text = User().FullName ||
    Facilitator2.Text = User().FullName ||
    Facilitator3.Text = User().FullName ||
    Facilitator4.Text = User().FullName ||
    Facilitator5.Text = User().FullName ||
    MonosMAccess.Text = User().Email ||
    MonosAAccess.Text = User().Email ||
    RhanniesMAccess.Text = User().Email ||
    RhanniesAAccess.Text = User().Email ||
    'James''MAccess'.Text = User().Email ||
    'James''AAccess'.Text = User().Email ||
    MonitorAccess.Text = User().Email
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • v-siky-msft Profile Picture
    on at
    Re: Filtering on "Visible" by multiple conditions

    @Anonymous 

     

    Hope my understanding is right:

    TrainingDataTab_1.DisplayMode = Disabled &&

    If(Facilitator1.Text = User().FullName, true) ||
    If(Facilitator2.Text = User().FullName, true) ||
    If(Facilitator3.Text = User().FullName, true) ||
    If(Facilitator4.Text = User().FullName, true) ||
    If(Facilitator5.Text = User().FullName, true) ||
    If(Facilitator6.Text = User().FullName, true) ||
    If(MonosMAccess.Text = User().Email, true) ||
    If(MonosAAccess.Text = User().Email, true) ||
    If(RhanniesMAccess.Text = User().Email, true) ||
    If(RhanniesAAccess.Text = User().Email, true) ||
    If('James''MAccess'.Text = User().Email, true) ||
    If('James''AAccess'.Text = User().Email, true) ||
    If(MonitorAccess.Text = User().Email, true)

    Sik

  • Community Power Platform Member Profile Picture
    on at
    Re: Filtering on "Visible" by multiple conditions

    Hello @mdevaney ,

     

    Your last one worked like a charm, but now I am lastly trying to add one more filter:

     

    If(DataCardValue34_1 = User().FullName, true) ||

     

    Yet when I try to put it into the last code sequence, it doesn't function. Is it where I am placing it?

    Here is where I put it:

     

    TrainingDataTab_1.DisplayMode = Disabled &&

    (
    If(Facilitator1.Text = User().FullName, true) ||
    If(Facilitator2.Text = User().FullName, true) ||
    If(Facilitator3.Text = User().FullName, true) ||
    If(Facilitator4.Text = User().FullName, true) ||
    If(Facilitator5.Text = User().FullName, true) ||
    If(Facilitator6.Text = User().FullName, true) ||
    If(DataCardValue34_1 = User().FullName, true) ||
    If(MonosMAccess.Text = User().Email, true) ||
    If(MonosAAccess.Text = User().Email, true) ||
    If(RhanniesAAccess.Text = User().Email, true) ||
    If(RhanniesAAccess.Text = User().Email, true) ||
    If('James''MAccess'.Text = User().Email, true) ||
    If('James''AAccess'.Text = User().Email, true) ||
    If(MonitorAccess.Text = User().Email, true)
    )

     

    Should I place it elsewhere?? or can it not also be a working filter along with the others?

    Thanks

     

  • mdevaney Profile Picture
    29,989 Moderator on at
    Re: Filtering on "Visible" by multiple conditions
    @Anonymous
    You are very close to the solution here. Currently you have this:

    DataCardValue34_1

    But I think you would need to add .Text if it’s a Textbox

    DataCardValue34_1.Text

    If it’s not a textbox the property will need to be something else. Let me know.

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard