We are using Siverware for Bartender in BC SaaS and are trying to calculate case quantities which are based on a calculation. What I am trying to do is:
- Pull in the Item Unit of Measure.Code = CS
- If CS does not exist, then I want the Case Qty to show as blank
- If the line's Unit of Measure Code = CS, then print the line Quantity
Right now what is happening, no matter how I write the VB script, if there is no Item Unit of Measure.Code = CS, then the line Quantity is being divided by 0. This is the latest rendition of my VB script, and any help would be GREATLY appreciated!
Value1 = 0
If Format.NamedSubStrings("ItemUnitofMeasure_Code").Value = "CS" Then
Value1 = Format.NamedSubStrings("ItemUnitofMeasure_QtyperUnitofMeasure").Value
Value = IIF(Format.NamedSubStrings("IWXLPLine_UnitofMeasureCode").Value = "CS",Format.NamedSubStrings("IWXLPLine_Quantity").Value,IIF(Value1=0,"",Format.NamedSubStrings("IWXLPLine_Quantity").Value / Value1))
Please sign in to leave a comment.