BIE Formula Help

I called Sage support, but got nowhere, as my request was deemed "too complex" by the "subject matter expert". Note to Sage, if you're going to charge people for support, at least train your support reps on using Functions. 

Can anyone tell how to create a BIE formula using the IF/Then statement? Just trying to look at values of 2 fields and take the one not equal to zero. Example: IF "AR_InvoiceHistoryDetail"."QuantityOrdered"=0 THEN "AR_InvoiceHistoryDetail"."QuantityShipped" ELSE "AR_InvoiceHistoryDetail"."QuantityOrdered". Using Sage 100 2013.