Expand all | Collapse all

Problem with if/and/or statement

  • 1.  Problem with if/and/or statement

    Posted 10-17-2017 16:52

    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!

  • 2.  RE: Problem with if/and/or statement

    Posted 10-17-2017 18:29
    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.