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

Filtering on "Visible" by multiple conditions

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

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filtering on "Visible" by multiple conditions

@MonoM 

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."

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Filtering on "Visible" by multiple conditions

@MonoM 

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."

View solution in original post

Microsoft v-siky-msft
Microsoft

Re: Filtering on "Visible" by multiple conditions

@MonoM 

 

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

MonoM
Level: Powered On

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

 

Super User
Super User

Re: Filtering on "Visible" by multiple conditions

@MonoM
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.

Helpful resources

Announcements
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.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

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 (8,525)