AnsweredAssumed Answered

Adding multiple validations to a control

Question asked by alinn on Jan 18, 2016
Latest reply on Jan 18, 2016 by alinn

I am working on a form that I want to use validation rules for. I have a drop down menu where users can either select "Link" or "Document". If they select "Link" then they must complete the link field and if they select "Document" they must add at least 1 attachment.


I was using the following validation rule for on my link field:

equals(TypeOfReference, 'Link')


And I was using the following validation rule for me attachments field:

equals(TypeOfreference, 'Document')


These rules work fine, but it doesn't check to see if the Link or Attachments are empty so it won't let users submit the form. I have also tried the following rules but they will not work and allow users to submit the form when they haven't completed the necessary fields.


equals(TypeOfReference, 'Link') && IsNullOrEmpty({Self})

equals(TypeOfReference, 'Link') && {Self} == ""


I also have tried using custom JavaScript, but was having the same issue. Below is a screenshot of my form.