cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Help with Multiple Conditional checks for Visible Setting

I have the following Formula working to hide a message, or show a message, if the conditions are met:

If(!IsBlank(Statusval.Text),false, ReqType.Selected.Value = "Vendor Add", false, ReqType.Selected.Value = "-", false, ReqType.Selected.Value = "Block Vendor", false, ReqType.Selected.Value = "Vendor Change"  && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true, ReqType.Selected.Value = "Unblock Vendor" && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true, false)

This show the message if the 3 Variables are blank and the Type selected is Change or Unblock.

I now am trying to add an additional check of a 2nd field and when doing so it "Loses its mind" on when to show or hide..
looking to change this: ReqType.Selected.Value = "Vendor Change" && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true
to check a 2nd field:
ReqType.Selected.Value = "Vendor Change" && TypeVendor.Selected.value = "Purchase Order" &&  IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true

But doing a check of a 2nd field breaks the "Or" statement and the message doesn't continue to show when it should.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II
Resolver II

Re: Help with Multiple Conditional checks for Visible Setting

Since I couldn't figure out a way to do it all in one.. I created two separate Labels.. where they hide based on the Type of Vendor Selected:

If(TypeVendor.Selected.Value = "Non-Purchase Order Vendor", false, !IsBlank(Statusval.Text), false, ReqType.Selected.Value = "Vendor Add", false, ReqType.Selected.Value = "-", false, ReqType.Selected.Value = "Block Vendor", false, ReqType.Selected.Value = "Vendor Change" && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true, ReqType.Selected.Value = "Unblock Vendor" && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true, false)

and the other one is: TypeVendor.Selected.Value = "Purchase Order Vendor", false,

 and it works as I need it..

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Help with Multiple Conditional checks for Visible Setting

@shanemeisner 

Would throwing some brackets around the AND logic help?  Suggest you start by doing this and then experiment with placement of the brackets.

 

(ReqType.Selected.Value = "Vendor Change" && TypeVendor.Selected.value = "Purchase Order" &&  IsBlank(varVendorInfo)) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true

 

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

Highlighted
Resolver II
Resolver II

Re: Help with Multiple Conditional checks for Visible Setting

Thanks @mdevaney .. Tried placing brackets in a couple different places with no change.
1st attempt:
(ReqType.Selected.Value = "Vendor Change" && TypeVendor.Selected.Value = "Purchase Order Vendor" && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true,
Then tried:

(ReqType.Selected.Value = "Vendor Change" && TypeVendor.Selected.Value = "Purchase Order Vendor" && IsBlank(varVendorInfo) ) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true,

and lastly tried:

(ReqType.Selected.Value = "Vendor Change" && TypeVendor.Selected.Value = "Purchase Order Vendor" && IsBlank(varVendorInfo)  Or IsBlank(varVendorPay) Or IsBlank(varVendorw89)) ,true,

All ended up still showing the Message even though "TypeVendor" was not "Purchase Order Vendor" as shown below:

vendorchange.png

Highlighted
Super User III
Super User III

Re: Help with Multiple Conditional checks for Visible Setting

@shanemeisner 

It is likely showing because one of these OR conditions are true.

Or IsBlank(varVendorPay) Or IsBlank(varVendorw89)

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

Highlighted
Resolver II
Resolver II

Re: Help with Multiple Conditional checks for Visible Setting

Correct @mdevaney , they are.. But when it comes to a "Non-Purchase Order Vendor", the 

IsBlank(varVendorPay)

 Will always be blank.. So I need the message to be visible if the Vendor type is "Purchase Order" and the 3 Variables are blank.. 

But, if Vendor type is "Non-Purchase Order", then I will only want to check 2 of the 3 variables( haven't even started to add that yet).
At this point I can't get it to check both the Request Type and the Vendor type + the 3 Or Statements.
In the case of my screen shot, for this test, the message should be hidden as the Vendor type is Non-purchase order.. 
I did find that if I reduce my Variable check down to just two of them like this

 ReqType.Selected.Value = "Vendor Change" && TypeVendor.Selected.Value = "Purchase Order Vendor"  && IsBlank(varVendorInfo) Or IsBlank(varVendorPay),true
It worked.. it's adding the next "Or" that breaks the logic.

Highlighted
Resolver II
Resolver II

Re: Help with Multiple Conditional checks for Visible Setting

Since I couldn't figure out a way to do it all in one.. I created two separate Labels.. where they hide based on the Type of Vendor Selected:

If(TypeVendor.Selected.Value = "Non-Purchase Order Vendor", false, !IsBlank(Statusval.Text), false, ReqType.Selected.Value = "Vendor Add", false, ReqType.Selected.Value = "-", false, ReqType.Selected.Value = "Block Vendor", false, ReqType.Selected.Value = "Vendor Change" && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true, ReqType.Selected.Value = "Unblock Vendor" && IsBlank(varVendorInfo) Or IsBlank(varVendorPay) Or IsBlank(varVendorw89) ,true, false)

and the other one is: TypeVendor.Selected.Value = "Purchase Order Vendor", false,

 and it works as I need it..

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (10,718)