Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Invert sign on decimal field with AutoFormatExpr property

$
0
0
Hi,
I want to create a list page showing purchase lines (T39) from orders and return orders.
If the record's Document Type=Order, the field Quantity should be shown as default, but if the Document Type=Return Order, the field Quantity should be shown with inverted sign (e.g. Quantity=4 would be shown as -4 and vice-versa). I don't want to change the data, and I don't want to calculate the data on the page because this would prevent the users from sorting and filtering the data afterwards.
So, I was wondering, if I can acheive this by the use of the AutoFormatExpr-property on the page column.

I have tried to create a AutoFormatExprText string variable and set it to '-<Standard Format,0>' in the OnAfterGetRecord, if Document Type=Return Order and Quantity > 0, and then set the AutoFormatExpr=AutoFormatExprText on the column Quantity (AutoFormatType=10). That didn't work.

I am coding in NAV 2017. Any suggestions?

BR Emerik

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>