NancyScholl
4 years agoQrew Member
Part, but not all, of updated formula working
I have a checkbox field containing a formula. We needed to make some changes, and not quite getting the syntax correct. Would appreciate some help/input, please.
Here is the original formula - this worked:
If([Request Status]="Draft" and [# of WBS codes]>0 and [Related Position Number]>0 and [WBS Not Required?]=false,true,
If([Request Status]="Draft" and [# of WBS codes]=0 and [Related Position Number]>0 and [WBS Not Required?]=true,true,false))
We were given additional requirements, and tried to add on to this field with the following lines. This updated version works when there is a WBS code, but doesn't work when there isn't one. (For BOTH Customer & No Customer access):
If
(If(([Request Status]="Draft" and [# of WBS codes]>0 and [Customer Access IS Required]=false and [WBS Not Required?]=false),
true,
If(([Request Status]="Draft" and [# of WBS codes]=0 and [Customer Access IS Required]=false and [WBS Not Required?]=true)
,true)),false)
or
(If(([Request Status]="Draft" and [# of WBS codes]>0 and [Related Position Number]>0 and [WBS Not Required?]=false),
true,
If(([Request Status]="Draft" and [# of WBS codes]=0 and [Related Position Number]>0 and [WBS Not Required?]=true),
true),
false))
I tried mapping it out like this - maybe this will help:
------------------------------
Nancy Scholl
------------------------------
Here is the original formula - this worked:
If([Request Status]="Draft" and [# of WBS codes]>0 and [Related Position Number]>0 and [WBS Not Required?]=false,true,
If([Request Status]="Draft" and [# of WBS codes]=0 and [Related Position Number]>0 and [WBS Not Required?]=true,true,false))
We were given additional requirements, and tried to add on to this field with the following lines. This updated version works when there is a WBS code, but doesn't work when there isn't one. (For BOTH Customer & No Customer access):
If
(If(([Request Status]="Draft" and [# of WBS codes]>0 and [Customer Access IS Required]=false and [WBS Not Required?]=false),
true,
If(([Request Status]="Draft" and [# of WBS codes]=0 and [Customer Access IS Required]=false and [WBS Not Required?]=true)
,true)),false)
or
(If(([Request Status]="Draft" and [# of WBS codes]>0 and [Related Position Number]>0 and [WBS Not Required?]=false),
true,
If(([Request Status]="Draft" and [# of WBS codes]=0 and [Related Position Number]>0 and [WBS Not Required?]=true),
true),
false))
I tried mapping it out like this - maybe this will help:
Draft and WBS field - when conditions are met, this box needs to be checked (selected): | ||||||||
Request Status = Draft | Entire line | Draft & WBS field desired results | ||||||
AND EITHER of these two: | WBS Not Required? False | and | # of WBS Codes > 0 | and | Related Position Number > 0 | TRUE | Checked | |
WBS Not Required? True | and | # of WBS Codes = 0 | and | Related Position Number > 0 | TRUE | Checked | ||
OR | ||||||||
EITHER of these two: | WBS Not Required? False | and | # of WBS Codes > 0 | and | Customer Access IS Required = false | TRUE | Checked | |
WBS Not Required? True | and | # of WBS Codes = 0 | and | Customer Access IS Required = false | TRUE | Checked | ||
Otherwise | FALSE | Unchecked |
------------------------------
Nancy Scholl
------------------------------