Abort save when multiple fields are blank formula field - help with formula operators/construction

  • 0
  • 1
  • Question
  • Updated 5 years ago
  • Answered
On my main form users will enter data and save as information comes in. When certain sections are complete they change the status of that section which alerts the next user to start work. Within two of these sections there are fields that need to be required to change the status and move the work along. These required fields can not be generally required because then users could not update and save the form as they acquire new information.

My plan is to create a formula field checkbox that looks at the status field if it has a particular status ([status]="Ready for Next User") and all of the fields in that section and produces a check if ALL fields are full or null if ANY of them are empty. Then I will create a rule on the form that incorporates the checkbox as required and if it fails the message appears ("you are missing entry in one of the required fields, you cannot save this record") and the save aborts.

My question: How can I construct this formula?
Photo of Leanne

Leanne

  • 354 Points 250 badge 2x thumb

Posted 5 years ago

  • 0
  • 1
Photo of Jack

Jack, Champion

  • 50 Points
Dear Leanne,

I would personally use a formula text field as the filter for your form rule as you can use one field to do all the checking for you and one rule to prevent the save.

You could try:

If([Status]="Sent to team 2" and [Field1]="" or [Field2]="" or [Field3]="" or [Field4]="","Entry Error","Ok")

You would then set your form rule to abort save if your formula text field is equal to "Entry Error"

If you want to expand the checking to multiple users teams you could do this by using the same field.

If([Status]="Sent to team 2" and [Field1]="" or [Field2]="" or [Field3]="" or [Field4]="","Entry Error",


If([Status]="Sent to team 3" and [Field6]="" or [Field7]="","Entry Error",

If([Status]="Sent to team 4" and [Field9]="" or [Field10]="","Entry Error","Ok")

Hope this helps.

Jack
Photo of Leanne

Leanne

  • 354 Points 250 badge 2x thumb
Thanks for the response Jack! I was able to get this to work today.
Photo of Jack

Jack, Champion

  • 50 Points
Fantastic! The other reason for using a formula text field which it slipped my mind to mention is that there is a limit to the number of form rules you can use on one form, so using one field and one rule rather than more field and more rules is quite helpful.