How to save decimal value and make it round off to the desired value on a list view

  • 15 February 2022
  • 0 replies
  • 177 views

Badge +9
 

How to save a decimal value and make it round off to the desired value on a list view

KBS100201

PRODUCT
K2 Cloud
K2 Five
K2 blackpearl 4.7
BASED ON
K2 Five (all)
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.

Objective

This article is for users that would like to change their decimal data type to round off to their desired "rounding off value," as the value gets saved to the list view / back end database.

The K2 application provides two decimal places by default when the decimal SmartObject property is created.

 

Before You Begin

This KB is meant to provide the solution for K2 users running K2 Five. However, an additional solution/alternative is provided to also cover K2 users running K2 blackpearl 4.7.

How-to Steps

In K2 Five, you can specify your desired rounding off when creating the SmartObject properties for the decimal data type as depicted below. This is still editable even after the views and forms are already generated.

The rounding off is only applicable to SmartBox SmartObjects and no other Service Types.

The decimal places only apply to SmartBox SmartObject properties.

Image

In K2 blackpearl 4.7 you will need to do the following:

1. Create a custom database

2. In a datatype decimal specify the desired rounding off value

3. Create an SQL service instance

4. Connect your SmartObject to your custom database.


0 replies

Be the first to reply!

Reply