Skip to main content

I am trying to generate a formula where:

1. If date in field x is greater than 1953, then 1 is put in field z

OR

2. If checkbox is checked in field y, then 1 is put in field z

I came up with this formula

IF(OR({NO DIGITAL} = 0), ({CODE-DATE} > 1953), "1")

However, this is producing a statement that reads 'true' if {CODE-DATE} > 1953, and '1' if {NO DIGITAL} = 0 (that is to say, box in {NO DIGITAL} is checked)

Any idea why this is happening or how to get the results I want?

Hi @K_B1,

here we have a simple syntax error. The or statement only looks at {NO DIGITAL} = 0. As a result you have the following:

  • If the value of the checkbox is true, it will print the result of this operation in the formula field: {CODE-DATE} > 1953 which in your example is true.
  • If the statement is false it will print 1

Assuming that you want to print a 0 if both statements are not true, the formula should look like this:

IF(OR({NO DIGITAL} = 0, {CODE-DATE} > 1953), 1, 0)

Let me know if it works!
Best, Patrick @Monino Solutions


what if I want it to do nothing if both statements are false?

 


Got it working.  Thanks!

 


what if I want it to do nothing if both statements are false?

 


Then the formula should include an empty string like below:

IF(OR({NO DIGITAL} = 0, {CODE-DATE} > 1953), 1, "") 

Let me know if that works. 

Best,

Patrick


Reply