try using "contains" instead "equals"
like this? I feel like something is wrong with my and section since I am trying to use both an "or" and an "and"
or(isNullOrEmpty(ProjectJobCategory),contains(ProjectJobCategory,"Provider"), ProjectJobCategory, "Health Promotion" and AreyouapartoftheHealthPromotionTeam?, "yes")
I'm not sure I understand your scenario correctly.
you have a ProjectJobCategory control (is it a choice?)
it has some 5 options, two of them a 'Provider' and 'Health Promotion'
then you have some 'Are you a part of the Health Promotion Team?' control (is it a yes/no control?)
and you want to hide some panel when either of 3 following is true
- there is no option selected for ProjectJobCategory,
- there is selected 'Provider' option
- there is selected 'Health Promotion' AND 'Are you a part of the Health Promotion Team?' is set to YES
is that right?
if above assumptions are correct then following could work for you
This looks great. The only correction I have to the assumptions is it isn't a yes/no check box but it is a yes/no choice (because I need to something else to happen if the answer is yes as well if it is no and for neither to show up if blank). I took I stab at it in blue but I'm sure I'm wrong.
or(isNullOrEmpty(ProjectJobCategory),
or(inArray(ProjectJobCategory,'Provider'),
and(inArray(ProjectJobCategory,'Health Promotion'),
Are you a part of the Health Promotion Team?="Yes")))
Even though I need a yes/no choice instead of a check box I tried the formula because I want to learn, but, it's not hiding from the Provider Choice or the Health Promotion Choice, let alone Health Promotion and Are you a part of the Health Promotion team
comparison operator is doubled equal sign
Are you a part of the Health Promotion Team?=="Yes"
when you were copying script from here, have you replaced control name placeholders with your real control references? otherwise they will copy as plain text.
check spelling of compared strings whether they fit to your setup.
sometimes it might happen that copy&pasted functions are as well not recognized as functions but rather as texts. so try to build the formula from scratch in your builder without any copying.
Typing the formula instead of copying and pasting made it sort of work as it did something but it blanked out the whole form (including the initial question that needs to be asked. I confirmed that my rule was in the panel of questions I want to hide. Is there a space. When do you use double quotes vs. single quotes?
or(isNullOrEmpty(ProjectJobCategory),or(inArray(ProjectJobCategory,'Provider'),and(inArray(ProjectJobCategory,'Health Promotion (Disease Management)),AreyouapartoftheHealthPromotionTeam)))
that's typical symptom that something got syntactically broken on your form.
it might be rule, custom validation, javascript or even data if formulas are ready for some 'sensitive' characters.
in your formula above you eg. miss closing apostrophe for "Health Promotion (Disease Management)"
braces within the same string can cause problems as well.
check developer console, that should give you a hint what's going wrong.
Thanks I found Dev Talk but Developer Console, is there a link for developer console?
developer console is part of the browser.
press F12 in browser to open developer console, load the form and then check back in developer console whether there are not reported any errors.
That looks like a really cool tool if I knew how to read it. I am more of a power user than a developer. I don't java script or html or css code which is one of the reasons I love SharePoint
thank you for trying but that is so over my head, I found a missing comma but there has to be something that tells me when to use commas and single vs. double quotes etc.
or(isNullOrEmpty(ProjectJobCategory),or(inArray(ProjectJobCategory,'Provider'),and(inArray(ProjectJobCategory,'Health Promotion (Disease Management)'),IsthisaHealthPromotionLayoutrequest?=='Yes')))
In English is this saying (hide) if 1) empty or 2) provider or 3) health promotion and layout?
single or double quotes - it doesn't matter, you just have to use the same ones for a single string
you have some orphaned question mark in IsthisaHealthPromotionLayoutrequest?=='Yes
if you're not able to identify a problem with complex formula, build it step by step, expression by expression until you find the problem.
good approach is to place calculated value controls on the form and set up their formulas from simplest expression up to complex ones, so that you can exactly track each of them how do they evaluate.
eg.
1st calc control's formula: ProjectJobCategory
2nd calc control's formula: isNullOrEmpty(ProjectJobCategory)
etc.
Thank you. I will try that.
This is what ultimately ended up working:
ProjectJobCategory=='Health Promotion (Disease Management)'&&IsthisaHealthPromotionLayoutrequest?=='No'||ProjectJobCategory==''||ProjectJobCategory=='Provider'
Now I am trying something similar to another formula for a separate panel...piece by piece little by little