Need Help With Iff
Good Afternoon,
I am trying to get a code together that would be something along the lines of, if 1-2 > 0, and this says "R", then replace 1-2 with 0. I know how to do the first part, but it's adding that extra "and" in there. I'm not really sure how to do it.
Right now my code is: IIf([OrderData.ORD_TonLimit] - [OrderData.ORD_TotalTons] > 0,[OrderData.ORD_TonLimit] - [OrderData.ORD_TotalTons],0) which is showing me if the 1-2 is less than 0 then keep it as 0. But I don't want it to always do this. I only want it to do this is the order status is released "R".
Any ideas?
I am trying to get a code together that would be something along the lines of, if 1-2 > 0, and this says "R", then replace 1-2 with 0. I know how to do the first part, but it's adding that extra "and" in there. I'm not really sure how to do it.
Right now my code is: IIf([OrderData.ORD_TonLimit] - [OrderData.ORD_TotalTons] > 0,[OrderData.ORD_TonLimit] - [OrderData.ORD_TotalTons],0) which is showing me if the 1-2 is less than 0 then keep it as 0. But I don't want it to always do this. I only want it to do this is the order status is released "R".
Any ideas?
Comments
[IIF(<OrderData."ORD_TonLimit"> - <OrderData."ORD_TotalTons"> > 0, <OrderData."ORD_TonLimit"> - <OrderData."ORD_TotalTons">, 0)]