# If statement

752
3
01-05-2022 12:33 PM
Occasional Contributor III

I am trying to calculate a yes or no answer for a field using the formula below.

if((string-length(\${inbox_flag})=5,"yes" and string-length(\${leak_tagno})>0,"yes"), 'yes', 'no')

I keep receiving invalid result and have been banging my head against the wall all afternoon. What am I doing wrong?

Thanks,

--gary

Tags (3)
1 Solution

Accepted Solutions
MVP Regular Contributor

Hi Gary,

This worked for me:

if((string-length(\${inbox_flag})=5 and string-length(\${leak_tagno}) > 0), 'yes', 'no')

You had extra "yes" statements in there that weren't needed. Hope it makes sense!

Best,
Katie

“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
3 Replies
MVP Regular Contributor

Hi Gary,

This worked for me:

if((string-length(\${inbox_flag})=5 and string-length(\${leak_tagno}) > 0), 'yes', 'no')

You had extra "yes" statements in there that weren't needed. Hope it makes sense!

Best,
Katie

“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
New Contributor III

Good Morning Katherine,

Wondered if you would give this a quick look.

The name columns Two09 and Two09Calc. It currently has this for the calculation:

if((\${FinalFireAcreQuantity}>=300 and \$NumberFatalities} >=1), 'Yes','No')

If statement is true, then Two09 = Yes, if not Two09 = No.

Christopher

Occasional Contributor III

That worked.

Thanks!!

--gary