Format a value into %

  • 4 December 2015
  • 5 replies
  • 2 views

Badge +8

Hi All

 

Can anyone help with this?

 

I have a Smartform item list view which has a column containing numbers in the format xx.x (e.g. 92.3)

these values represent percentages so I would like to add '%' after the number


If I select style and format using percentage it turns the values into 9,230.00 % (basically it's multiplying by 100)

 

Is there any way to simply add the '%' sign after the number without changing the format of the number

e..g just format a value of 92.3 into 92.3%

 

thanks

 


5 replies

Userlevel 5
Badge +16

Hi.

 

You can add another column with a control type of data label, set an expression on this column which concatenates the Percentage value(smartobject property) with the percentage sign

Badge +7

Hey,

 

you can still achieve this on the same column without adding extra column to the list.

 

steps:

1) on the column which display the decimal values (per your example 92.3), navigate to the properties under body section, you can find display field which is default mapped to the Smartobject property. Set it to none ( it means remove the data reference).

2) now go to expressions on the same column and define your expressions

 expressions looks like - [smartobject property caputres decimal value data] CONCAT [%]

 

the reason why we removed the reference at the step 1 is to define the expressions on the same column, unless we remove the reference it doesn't all you to make use of the same column property in the expressions as cycle reference is not allowed in expressions.

 

hope it helps,

cheers,

Prajwal Shambhu

 

 

 

Badge +8

Hi Prajwal  Thanks for the reply 

 

Your solution osunds good but I cant find a way to remove the column reference as you mentioned in step 1.

 

If I select the column and then body properites underneath it just shows blank.  I dont see any option to remove the reference.

Could you screenshot exactly how I do this.

 

thanks for your help

Paul

Badge +5

Hi,

 

1. Create a column and add a "Data Label". See Pic 1

2. Set the expression on the Data Label with "Concatenate ( <Percent property from SmartObject>, '%' 0". See Pic 2.

 

 

JK.


13065i27D1743DE23E684E.png
14174i5495AF0C7BDFC5AB.png
Badge +2

Hi Psturmey,

 

Please see attached screenshot for your reference. I think it's the easiest way. 

 

Regards,

John Marapao

 

 


12187i50E6FEB9B34EC4E4.png

Reply