Skip to main content
Solved

If And formula to check 2 conditional fields

  • November 5, 2023
  • 2 replies
  • 41 views

Forum|alt.badge.img+4
  • New Participant

Hi! I'm pretty new and having difficulty figuring out the logic of how to write this: 

  1. (single select) Status = "review 1" or "review 2" 
  2. (Long text) Feedback must not be blank 

If the above is true then it should provide an output of - "Ready!"

And then preferably the errors can drill down to the exact issue..

  • If the status is neither of those - Error, wrong status! 
  • If the feedback box is blank - Error, missing feedback! 

This seems simple but I can't seem to figure out the correct formatting to return correct results. Help appreciated 😄 

Best answer by Arthur_Tutt

Hey @kb1 yeah there's a few nested IF statements here that can make the logic and syntax a bit messy. I drafted something up that should work for you (will need to update my variable names to match your field names).

Sample table setup and desired output:

Formula:

IF( NOT({Feedback}), "Error, missing feedback!", IF( NOT( OR( {Status} = "Review 1", {Status} = "Review 2" ) ), "Error, wrong status!", IF( AND( OR( {Status} = "Review 1", {Status} = "Review 2" ), {Feedback} ), "Ready!" ) ) )

Let me know if this works for you!

 

2 replies

Arthur_Tutt
Forum|alt.badge.img+19
  • Brainy
  • Answer
  • November 5, 2023

Hey @kb1 yeah there's a few nested IF statements here that can make the logic and syntax a bit messy. I drafted something up that should work for you (will need to update my variable names to match your field names).

Sample table setup and desired output:

Formula:

IF( NOT({Feedback}), "Error, missing feedback!", IF( NOT( OR( {Status} = "Review 1", {Status} = "Review 2" ) ), "Error, wrong status!", IF( AND( OR( {Status} = "Review 1", {Status} = "Review 2" ), {Feedback} ), "Ready!" ) ) )

Let me know if this works for you!

 


Forum|alt.badge.img+4
  • Author
  • New Participant
  • November 6, 2023

Thank you so much for the help @Arthur_Tutt That worked beautifully 🙂