If Statement - What is wrong here?

I only want to pass a number (1000 or 500) if the “# of Changes” is empty !!!

Hmm, Looks good on the first look.

Can you try comparing it against null and see if that fixes the issue?

Screenshot from 2023-07-03 23-28-36

1 Like

Nops, please look it’s 2 if Statements

Any help? Urgent

Bump

Wait, by this you mean, do you want to send “First Close” if only # of changes is empty?

1 Like

Yes right

But as you see there is another if statement

Thanks for your help, I need it badly ASAP

Not sure, what you are getting for # of Changes, So, you can compare it against emptystring or null and then for the key/value if it exists you can do something like this,

{
	"records": [{
			"fields": {
				{{if(2.`# Of Changes` = emptystring | 2.`# Of Changes` = null; """First Close"": " + if(2.`Side 2` = "BUY"; 500; 1000) + ",")}}
				"# Of Changes": {{2.`# Of Changes` + "1
			},
			""id"": ""rec560UJdUtocSouk""
		}
	]
}"}}

Thanks a lot! You might not realize it, but you help me so much. Really appreciate it!