If statement

756
3
Jump to solution
01-05-2022 12:33 PM
GaryBowles1
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)
0 Kudos
1 Solution

Accepted Solutions
Katie_Clark
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

View solution in original post

3 Replies
Katie_Clark
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
ChristopherMask
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

0 Kudos
GaryBowles1
Occasional Contributor III

That worked.

Thanks!!

--gary

0 Kudos