This sample will create a B1 Validation that calculate the total quantity from all lines on a document and place the result in a User-defined Field.
Articles in this section
- Sample - Check for duplicate item codes in document lines
- Sample: Validation - how to check if the OnHand quantity of an Alternative item is larger than the one being sold
- Sample: Line loop - How to check if line items in PO are in Blanket Agreement
- Sample: Automation - How to set the batch numbers based on UDF
- Sample: How to keep last parameter values in SQL Query Report
- Sample: Line Loop – Select multiple Invoices in Incoming Payment Window according to specific values.
- Sample: Line Loop – Automatically Check if Unit Price is Less than Item Cost
- Sample: How to copy a Sales Order to a Quotation
- Sample: Uppercase all Free Text
- Sample: Custom Validation - How to check for a minimum unit price
Comments
4 comments
I have tried this and it works for integers but not for floats.
Below message occours when the QTY is not an integer.
Message: Macro error in UF-036: System.Exception: Input string was not in a correct format.
[Macro Command: set($[$BOYX_5.0.NUMBER]|2.5)]
Macro Enviroment parameters:
[Current Form: 140 - Delivery]
[Source Row: 2] [Target Row: 2] [Break: False] [Initial
Hi George,
Please try to replace the NUMBER with CURRENCY.
Thanks, Naama
Instead of
set($[$BOYX_5.0.Number]|$[LLRESULT.Number]);
I used
set($[$BOYX_5.0.CURRENCY]|$[LLRESULT.Number]);
and it works!!
Thank you!
Rather than start a new thread, since my problem is the same, I thought it wise to ask here.
Fundamentally I have the same issue but the 'currency' fix did not work. It removed the error but the value is not written to the UDF. I am testing where the value is 599.8. I tried changing to currency in the line loop final result but this doesnt change anything. Do I need to change the UDF type? There are a bunch of other options but I am unsure which is best.
Can anyone advise?
Thanks
Please sign in to leave a comment.