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

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

@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

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

@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

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

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!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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