add comma (,) to a number?

eddiex666

New Member
I would like to add a comma (,) to my list view.

List view shows a table row that has a number 10000
I would like to present (not change) it to 100,00

Is that easy?


Eddie
 
It's a thousands separator so it only works on numbers over 999. I think people would be confused by changing 100 to 1,00 it would be mistaken for a decimal point.
 
ahh, yes,, the number is in Gram and should be in KG :)
so the number is correct... but i need so add a comma...

in sqql i did a sum/100, s? then is was ok.. but this time I need it to be in a View on fabrikar.

so any good ideas will be nice..

maybe so a EVAL? a query?

tips?

Eddie
 
whould is be possible to use a EVAL in a simple way?
"Renders an Input Field"
I god how to do a sql search, but maybe I can use a simple way?
I tryed in a EVAL to do a {FilterFabrikkxxxxxxxx(Element:300) but I did not get it working..

Eddie
 
There's no built in way to do it in the field element, but you could use a calc element to take the value of the field element and inserts the comma, and display that in the list instead of the field. The calc would be something like ...

Code:
return substr_replace('{yourtable___yourfield}', ',', -2, 0);

Replace yourtable___yourfield with the full element name of the field element.

Set "Calc on save only" to "No".

Set "Show in list" on the field element to No, and on the calc to Yes.

Hide the calc in the form view (in the main options in the calc settings).

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top