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.
Solved! Go to Solution.
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..
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."
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:
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."
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.
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..
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
212 | |
204 | |
85 | |
58 | |
38 |