Nested If / Contains Function

Hello,

Having trouble with a nested if statement that I’m trying to push. For some context, I’m trying to push “amount of time” through a webhook. The only issue is that the values are not constant (e.g. 8 years, 1 year, 20 years, 2 months). Right now, I’m running a test with “8 years” as my value but it keeps defaulting to “6 - 12 months”. Is there anything I’m doing wrong?

You need to get rid of the letters with parseNumber(). So in this case get rid of the word year. Do a split() function with a space as the separator and then the first() function.

Hope this helps!

Some of your brackets aren’t real Make IML brackets, instead they are plain text.

You’ll have to properly fix the nesting of the brackets.

2 Likes