I have a situation where if a given condition is met I want to take action, but if it is not met, I don't want to do anything. The line item is of type number and setting it to 0 is not a viable option for the ELSE side. So how can I code "do nothing"?
Thanks in advance!
Thanks for the quick response. I'm trying to do this without adding a line item but I can certainly see how your solution would work.
It is based on another line item (boolean) and the action taken when true also involves another numeric line item.
And just so I understand, why wouldn't
IF Boolean.lineitem = false THEN 0 ELSE numeric.lineitem x 50?
work?
The action I'm using is POST and since multiple time period can post to the same cell, 0 will override an existing value and I don't want that.
@dngingras I'm trying to think through the use case on this but I think I understand what you're trying to do.
I like @cianna.bramley and @CommunityMember83188 where you use a boolean, preferably from a system module (DISCO methodology)
But if you don't want to add another line item -
You can try using LEAD on the ELSE portion the same distance as the post. This will leave the value alone if it doesn't meet your condition.
For example,
IF Sales < 150 THEN POST(Sales, 2) + 100 ELSE LEAD(Sales, 2, 0)
In your example, the Jun value should be 230 but the LEAD function overwrite that value with the Aug Sales value. I actually got it to work by changing the logic of the line item I'm posting so that if the condition is not met, that line item becomes 0 and then the POST function gives the proper numbers.
Thank you all for your suggestions, much appreciated.