Problem with if/and/or statement

  • 0
  • 2
  • Question
  • Updated 2 years ago
  • In Progress

I am trying to build an if/and/or statement that does the following:

If record owner = "this role" and checkbox A is "true", then show this generate template button
If record owner = "not this role" and checkbox A is "not true", then also show this generate template button

If([Record Owner]="HR Advisor" and ([HRBP Approval]="true"),[Save & Generate Template],
If([Record Owner]=NOT"HR Advisor" and ([HRBP Approval]="null"),[Save & Generate Template]))

So far, I am receiving syntax errors and have not been able to build the formula properly.  If anyone has any suggestions that would be super helpful.

Thank you!
Photo of bintu85


  • 90 Points 75 badge 2x thumb

Posted 2 years ago

  • 0
  • 2
Photo of Matthew Neil

Matthew Neil

  • 31,758 Points 20k badge 2x thumb
One big thing to keep in mind while writing formulas is to consider the 'type' of fields you are using.

For example:
Record Owner is a User field and needs to be evaluated to a user.
Checkboxes are =true or =false, not ="true" or ="false"
URL fields us the url or Null, not "null"
Text fields use the "Text" or null with two quotes ""

Your formula currently has a lot of mix matched types, thus the errors.

What are the field types of all the fields AND values you are comparing?  Then we can get the syntax correct.