Number Format

Navigation:  Knowledge Base > Page Editor > General Attributes >

Number Format

Previous pageReturn to chapter overviewNext page

Number Format allows user to enter the text in the Text based UI Parts in form of Numbers. This can be set in the "Display format" property of the UI part.

Steps for using Number format property as Display Format on Page Editor.

Step 1: From the properties available for UI Parts, select Display Format as Number from the options available.

Step 2: User can select any data type for number format from the options shown in the image below.

numberformat_number  

 

Number Data type:

DataType

Description

boolean

Boolean is the data type which has two values "0" or "1".Usually its denoted "false" or "true" ,OR "no" or "yes".

double

Double is a number which can be written with a fractional or decimal component.

integer

An Integer is a number that can be written without a fractional or decimal component.

Step 3: Select Number Format

If user selects data type as Integer following options are available for selecting the number format.

numberformat_number_integer      

If user selects data type as Boolean following options are available for selecting the number format.

numberformat_number_boolean    

If user selects data type as Double following options are available for selecting the number format.

  numberformat_number_float    

Step 4: Enter Number Display Format which appears on selection of integer and float Number Formats.

If user selects data type as Double and the format is selected as Float then additional field “Number Display Format” has to be specified by the user as shown below.

numberformat_number_double_float  

Similarly If user selects data type as Integer format is selected as Decimal then additional field “Number Display Format” has to be specified by the user as shown

numberformat_number_integer_integer  

Number Format

Following number format will be set by page editor and runtime should use them to convert the internal number data type to external string or from external string to internal number data.

Number Format

Description

d

decimal number. From "0" to "9" and prefix "+" or "-" characters are accepted.

t

"true" or "false" string are accepted.

y

"yes" or "no" string are accepted

b

binary number. "0" or "1" characters are accepted

o

octal number. From "0" to "7" characters are accepted.

x

hexadecimal number. From "0" to "9" and From "a" to "f" characters are accepted.

f

float number. From "0" to "9" and "." and prefix "+" or "-" characters are accepted.

e

float number. From "0" to "9" and "." and prefix "+" or "-" and "e" characters are accepted.

Conversion from basic number string to internal value

Input text

Format

Result

Description

0 or 1

d

integer or boolean

It's integer internally.

true or false

t

boolean

It is converted to integer (0 or 1) internally.

yes or no

y

boolean

It is converted to integer (0 or 1) internally.

integer string

d

integer        

 

bit string

b

integer        

 

octal string

o

integer        

 

hexadecimal string

x

integer        

 

float string

f

double

 

float string

e

double

 

Number Display Format:

Format

Description

9

Display one digit number. You can specify the number of digits using some "9" characters.

0

Display one digit numer. It will show "0" even if the number of digits is not enough to display.

,

it will display the comma for each specified digits position.

.

Display the 1 character of numeric point.

U

Round Up 四捨五入 (new)

C

Cut Off 切り捨て (new)

A

Round Away 切り上げ (new)

Example use cases:

Format

Value

Display

999

12

12

999

1234

1234

999

11.24

11

99,999,999

12

12

99,999,999

1234

1,234

99,999,999

11.24

1

99,999,999

12345678

12,345,678

99,999,999.9U

11.56

11.6

99,999,999.9C

11.56

11.5

99,999,999.9A

11.56

11.6

000

12

012

000

1234

1234

000

11.24

011

00,000,000

12

00,000,012

00,000,000

1234

00,001,234

00,000,000

11.24

00,000,011

00,000,000

12345678

12,345,678

00,000,000.0U

11.56

00,000,011.6

00,000,000.0C

11.56

00,000,011.5

00,000,000.0A

11.56

00,000,011.6