You are viewing limited content. For full access, please sign in.

Question

Question

IF Statement Structure

asked on October 6, 2017 Show version history

Hello All,

 

For number fields, under the Advanced Tab the section to enter a formula includes an IF() statement.  Is there a document that outlines the structure that the function takes?  For example if I am checking if a equals b, would it be a=b or does it follow the Java structure of a==b?  

0 0

Replies

replied on October 6, 2017 Show version history

The former. Laserfiche Forms calculations are based on the OpenFormula standard (e.g. Microsoft Excel, Google Sheets).

For example - if A equals B, return a 1, otherwise return a 2  - would look as follows:

=IF(A=B,1,2)

2 0
replied on October 6, 2017

Thank you, Tri.  That is exactly what I needed to know

0 0
replied on April 9, 2021

Please advise on below

 if A equals B, return a 1, if C equals D, return a 2, if E equals F, return a 3

What would be the IF conditional statement.

 

Thanks

Arvind

 

1 0
replied on April 11, 2021

IF ( A = B, ANSWER IF TRUE, ANSWER IF FALSE )

To achieve what you want, you need to nest.

IF (A = B, TRUE, IF (C = D, TRUE, FALSE)) etc

So in your example this should work (returning zero if all conditions are false):

IF( A=B, "1", IF( C=D, "2", IF( E=F, "3", "0") ) )

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.