Multiple Field Validation Check

  • 0
  • 1
  • Question
  • Updated 1 month ago
  • Answered
Hi,

I am trying to setup some sort of validation check to see if something has been uploaded, but I wasn't sure how to code would look.

Basically I have 15 picture attachment fields and I have a formula checkbox field that I want "true" if more than one picture has been uploaded. So if "Picture 1" has something in it and "Picture 9", it should say true or be "checked", but if only "Picture 3", for instance, is the only field that has a picture in it, the checkbox should be false. I didn't know if there was some sort of function that lets you check for multiple fields that if 2 or more equal true then true, and I didn't want to setup a hundred line case or if statement.

Any ideas?
Photo of Jordan McAlister

Jordan McAlister

  • 1,522 Points 1k badge 2x thumb

Posted 1 month ago

  • 0
  • 1
var number NumberOfAttachments = Count(
ToText([File 1])<>"",
ToText([File 2])<>"",
..etc

ToText([File 15])<>"");

IF($NumberOfAttachments >0, "Sorry, But just 1 attachment allowed per record and you have " & ToText($NumberOfAttachments ))


Photo of Jordan McAlister

Jordan McAlister

  • 1,522 Points 1k badge 2x thumb
Works beautifully! Thanks Mark