nav 2015 - format decimal to show '%'

jensthomsenjensthomsen Member Posts: 173
edited 2015-08-31 in NAV Three Tier
Hi
Is it possible by use of some kind of Controll-Addin to format a decimal field to show '%' after the decimal value (ie. '12%')???

Comments

  • Jan_VeenendaalJan_Veenendaal Member Posts: 206
    You can use the AutoFormat properties for this. See on msdn: https://msdn.microsoft.com/en-us/library/dn789723(v=nav.80).aspx

    You can set this on a table field and/or on a page field.
    Set AutoFormatType to 10 , set AutoFormatExpr to (something like): '<precision,1:1><Standard Format,0>%'
    Jan Veenendaal
  • jensthomsenjensthomsen Member Posts: 173
    Hi Jan
    Exactly what I was looking for! Thx! But what if you want to use it in a list page and change from line to (1. line 200, 2. line same column 10%)?
  • Jan_VeenendaalJan_Veenendaal Member Posts: 206
    I think you should not try to use AutoFormat to behave differently on each line (you could probably do that if you really really REALLY want to, by modifying codeunit 45), but I would prefer to write a dedicated formatting function that transforms the decimal field value into a text variable, and show that text variable on your page.
    Jan Veenendaal
Sign In or Register to comment.