Testing if statements

I can’t get a basic if statement to work and I’m losing my mind. What am I not doing?

image


image

Hey @Allen_Vance

It is because the expression is an array, and when you run this module, it asks you for the value of A, not the expression. That’s why this condition is false.

3 Likes

They expression expects an array to evaluate rather than a value in the array. You can put a 1 inside the brackets to grab the first value in the array but you can’t keep the index blank.

3 Likes

EDIT: I guess what I should be asking is what’s the easiest way to map these values to a nested if statement? I basically have to transform the Ns and Ys and valid and whatnot to push them into HubSpot…

The below still results in a “B”

Could you copy and paste your output bundles from module 13 here so we can try to replicate the data structure you’re dealing with? I will try to replicate it and see if I can extract the value for the if expression.

2 Likes

For whatever reason, if I set the variable using the 1 in brackets and then do the IF statement later, it seems to work. I was able to complete my scenarios and, to my surprise, they work well! Thank so much for your input. Quite valuable!

3 Likes