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?

Comments

  • gpigpi
    edited 7:02AM
    Try
    [IIF(<OrderData."ORD_TonLimit"> - <OrderData."ORD_TotalTons"> > 0, <OrderData."ORD_TonLimit"> - <OrderData."ORD_TotalTons">, 0)]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.