Checking signature syntax and make it mandatory according to the yes/ No fields

  • 15 September 2017
  • 5 replies
  • 1 view

Badge +5

Hi all,

I have 2 fields one is I am an inventor (yes/no) field and the other is signature (text field).

So, the signatures in the signature field should be in "/signature/" format.

if user clicks yes for that yes or no field then the signature field should become mandatory and check whether the signature is in the above format or not.

I used following validation rule . it seems to be not working

not(not(IamanInventor))  &&  (!startsWith(SignedByField,'/') || !endsWith(SignedByField,'/')))

and below is the validation rule for mandatory that is working

not(not(IamanInventor)) && isNullOrEmpty({Self})

 The syntax rule is not working could you please help me out??


5 replies

Userlevel 5
Badge +14

I'd say you have too many negations there

try following

IamanInventor  &&  (!startsWith(SignedByField,'/') || !endsWith(SignedByField,'/'))

as well in your second formula, not(not()) - one negates with the other, so none is needed.

Badge +5

Hi Marian,

Thank you for your prompt response.

I tried this validation rule... no luck.

is there any other way ( I mean javascript?) to make this requirement work?

Please let me know!!!

Thanks in Advance!

Badge +5

HI Marian Hatala

You are right there are too many negotiations  in the validation rule I used.

Trial and error method worked for me

I used this rule and it started working magically.

IamanInventor && (or(!startsWith(SignedByField,'/'), !endsWith(SignedByField,'/')))

I deleted the mandatory rule that I used for this field not(not(IamanInventor)) && isNullOrEmpty({Self}) ( The syntax rule itself works as mandatory rule ( How silly I was!!))

Thanks a ton for your help , I really appreciate it!!

Thanks!!!

Userlevel 5
Badge +14

great.

your final formula is logically just the same as the one I suggested. you likely made some (small) typo/mistake, I'm quite sure it should work happy.png

Badge +5

Dear

Now I am facing another problem with the validation rule I am using sad.png

it doesn't work on edit.
I am using the formula below.

Is Edit Mode  && (or((!startsWith(SignedByField,'/'), !endsWith(SignedByField,'/'))

sad.png

I have no idea how to resolve this.

any inputs?

Thanks!!

Reply