2nd Parameter of Format Number function in expression builder


Badge +2

Hopefully this is an easy one... I have an expression that is generating text to put in a datalabel.  It includes a number that I want to display in the format:

 

999,999,999.99

 

I assume I use the Format Number function, but have no idea what to put in the second parameter.

 

Hope you can help.

 

Thanks

 

 

Matt


10 replies

Badge +7

I would use a custom style for that formatting situation.

 

Click on the data lable and poke into the styles:

Badge +2

Thanks, but I've tried ###,###,###.00 and it doesn't work.  Any ideas?


Badge +7

Hey Matt,

 

I didn't want you to plug that into the Expression, I wanted to point you over to the Style part of the control. 

 

Do you need to use an expression to populate your data lable? 

Badge +2

I want to build up a string that says something like:

 

Thank you for sending a requesting with the following details:

Value - 123,456.00

Description - A Payment Request

 

I am passing this text into another of my forms, which is a generic OK/Cancel form. 

 

Does this make sense?  Sorry for the delay replying.  I thought I would have gotten notifications automatically...

Badge +6

Hi,


 


Are you storing the value in some control and would like to pass the value through to a Message Box of some sort?


 


Regards.

Badge +2

Yes, exactly that.  Any ideas?

Badge +6

Have you tried applying an expression to the control on the subform that will display the value being passed through?

Badge +2

This is an old thread but I thought this could be helping someone or myself in the future.  I was building an expression and need to show it in currency with the commas, and using the Format Number function setting:

 

Name | Type | Value

Number | Decimal | {Drag in a value}

Format | String | #,#.00

 

 

2nd parameter is a text value.  "C" for currency and "N" for number.  I haven't figured out how to specify a custom format yet but at least two of them are known.

 

See the link below for reference:

https://help.k2.com/onlinehelp/k2smartforms/userguide/1.0.6/default.htm#SF_-_ViewDesigner_Layout_-_Calculation_Expression.html%3FTocPath%3DK2%20Designer%7CViews%7C_____12

 

Badge +9

Hi MattWilliams,

 

To Show number as "999,999,999.99" use Format Number function  with Format as "N" in second parameter.

 

Format Number supports only specific Format Text values.  Please refer below :

 

C" or "c"

Currency

"D" or "d"

Decimal

"E" or "e"

Exponential (scientific)

"F" or "f"

Fixed-point

"G" or "g"

General

"N" or "n"

Number

"P" or "p"

Percent

 

 

Reply