Problem with if/and/or statement

  • 0
  • 2
  • Question
  • Updated 1 year ago
  • In Progress
Hello,

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
or
If record owner = "not this role" and checkbox A is "not true", then also show this generate template button

Sample:
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

bintu85

  • 90 Points 75 badge 2x thumb

Posted 1 year ago

  • 0
  • 2
Photo of Matthew Neil

Matthew Neil

  • 31,438 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.