Forum Discussion

bintu85bintu85's avatar
bintu85bintu85
Qrew Trainee
7 years ago

Problem with if/and/or statement

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!

1 Reply

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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.