We are trying to set up a complicated dependency for a field, where we need to do a combination of both and
and or
condition.
How do I implement:
(FieldA and FieldB) or FieldC
We are trying to set up a complicated dependency for a field, where we need to do a combination of both and
and or
condition.
How do I implement:
(FieldA and FieldB) or FieldC
Copyright © 2021 Jogjafile Inc.
As you've noted, the qbo3
Dependency
behavior does not support mixingAND
withOR
.There are two workarounds.
Custom Javascript
You can create a JS function along these lines:
Then, add
requireComments()
to theonchange
handlers ofFieldA
,FieldB
, andFieldC
.Pros:
Cons:
Hidden Fields
If you prefer to stay away from the custom JS, you can get where you need to go with some hidden fields.
Create a hidden field called
FielldAFieldB
, and make it dependent onFieldA,FieldB
(AND). Then, makeExceptionCommentsInput
dependent onFieldAFieldB,FieldC
(OR).Pros:
Cons:
FieldAFieldB
) passed over the wire/saved the task