cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Formatting rule woes (and I mean PAIN)

After hours - HOUURRRSSSS of trying to take 2 rules and combine them into one, I am waving the white flag of surrender... 

OK...I have 2 rules that, when separate, both do EXACTLY what I need them to do (hide/unhide this panel of controls).  Great! However, I have tried every combination of "&&s and ||s and ((( and ))) and !(equals", etc. that I can think of to combine the 2 into what in my mind SHOULD be a "THIS || THIS && THIS" kind of package, but with everything I try, only one or the other responds, but not both. I have tons of rules written similarly that work just fine on other forms, but there's something about what I'm doing here that isn't working.  

This works: RequestTypeControl=="Report" && ReportReqTypeControl!=="Modify Existing Report"

This works: ReportReqTypeControl!=="New Report" && ExistingReportControl!=="Yes"

This does not: 

RequestTypeControl=="Report" && ReportReqTypeControl!=="Modify Existing Report" ||

ReportReqTypeControl!=="New Report" && ExistingReportControl!=="Yes"

This works: !(equals(ReportReqTypeControl,"Modify Existing Report"))

This works: !(equals(RequestTypeControl,"Report") && (equals(ReportReqTypeControl,"New Report") && (equals(ExistingReportControl,"Yes"))))

This does not:

!(equals(ReportReqTypeControl,"Modify Existing Report")) ||

!(equals(RequestTypeControl,"Report") && (equals(ReportReqTypeControl,"New Report") && (equals(ExistingReportControl,"Yes"))))

Those are just 2 of the probably 23957460348967205983209674 different ways I've tried to get this to work. Just imagine throwing parenthesis, exclamation points, equal signs and ampersands all over the place for a really long time.   

So basically, for all "Report" Request Types - If the Request Type of Modify Existing Report isn't selected, or the Request Type New Report PLUS the Existing Report response of Yes isn't selected, keep this panel hidden.

 

I'm feeling rather defeated.  Anyone have some ideas for me?  Any insight would be MUCH appreciated.

0 Kudos
Reply
5 Replies
Workflow Hero

Re: Formatting rule woes (and I mean PAIN)

so, if one or the other formula evaluates to true panel should be hidden?

what about this then?

(RequestTypeControl=="Report" && ReportReqTypeControl!=="Modify Existing Report")  ||

(ReportReqTypeControl!=="New Report" && ExistingReportControl!=="Yes")

Accept as Solution Reply
Workflow Hero

Re: Formatting rule woes (and I mean PAIN)

Exactly!

That is one of the many things that I tried before, but I just tried again because we know how weird things can get.  As before, it handles the first part perfectly, but when New Report and Yes are selected, nothing happens at all.  I'm thinking maybe I'm asking too much??

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Formatting rule woes (and I mean PAIN)

and what should happen when "New Report and Yes are selected" ?

should panel be shown or hidden?

from your formula, if ReportReqTypeControl is equal to "New Report" then second line evaluates to false hence no formatting is applied

Accept as Solution Reply
Workflow Hero

Re: Formatting rule woes (and I mean PAIN)

Have you tried grouping something like this?

or(and(RequestTypeControl=="Report",ReportReqTypeControl!="Modify Existing Report"),and(ReportReqTypeControl!="New Report",ExistingReportControl!="Yes"))

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Formatting rule woes (and I mean PAIN)

It would be a lot easier to logic out if we knew the amount of options that were being worked with. What are the options available for all of the controls? 

It's also helpful to know things like if you care about ExistingReportControl's value only when ReportReqControl equals "New Report".

You seem to want to show the panel if...

RequestTypeControl equals "Report"
AND
RequestReqTypeControl doesn't equal "Modify Existing Report"

You also wanna show the panel if...

RequestTypeControl equals "Report"
AND
RequestReqTypeControl equals "New Report"
AND
ExistingReportControl equals "Yes"

If that's right, then perhaps the following will work?

!(RequestTypeControl === "Report" && RequestReqTypeControl !== "Modify Existing Report" && (If(RequestReqTypeControl === "New Report", (ExistingReportControl === "Yes"), false)))
0 Kudos
Accept as Solution Reply