How would I get these IF statements written differently to account for the 3 scenarios it describes? The approach seems to work in other scenarios, and has worked for one of the IF statements, too…
{{if(5.amount != null & 6.amount = null; “-” + (5.amount / 100))}}{{if(5.amount = null & 6.amount != null; “-” + (6.amount / “100)”))}}{{if(5.amount != null & 6.amount != null; “-” + ((5.amount + 6.amount) / 100))}}
![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/1/21295f2603e8fdc36532f93386cc5333b7f6802d.png)
Thanks!
U have a problem with the formatting
try this-
if(
5.amount != null && 6.amount != null,
(5.amount + 6.amount) / 100,
if(
5.amount != null,
5.amount / 100,
if(
6.amount != null,
6.amount / 100,
null
)
)
)
2 Likes
What is the problem with the formatting, do you think? I need these amounts to come back negative, if you’re referring to the “-”
your first if ends without taking other if condition in consideration which is causing you the problem
3 Likes
My end result:
![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/a/2ac6f65bacadb0ddb808a0deaf296bf3ac743619.png)
It was challenging because you have to go back and clean up code a bit, but once you see the symbols have a background, you know it’s going to work.
Thank you, Thakur!
2 Likes
Hi @Charle_Remen ![:wave: :wave:](https://emoji.discourse-cdn.com/twitter/wave.png?v=12)
I’m just quickly jumping in to say congrats on getting the hold of the if statements with the assistance of @ThakurHemansh ![:clap: :clap:](https://emoji.discourse-cdn.com/twitter/clap.png?v=12)
Thanks a lot for sharing your progress and your final setup with the rest of us. This could be super helpful to many other searching for similar info in the future ![:pray: :pray:](https://emoji.discourse-cdn.com/twitter/pray.png?v=12)
2 Likes