Converting 2000 to 2K and 1000000 convert to 10M in activity or DT

Hi Team,

I have requirement like if value is 2000 and want to convert to 2K and if 1000000 then 10M in activity. How can we do this in activity or DT?

@kulks

Define the conditions and results for suffix determination.

Example Decision Table:

Conditions (When) Result (Suffix)

InputValue >= 1000000. M

InputValue >= 1000 K

(otherwise) (blank)

Call this decision in data transform to get the suffix for your input.

In the datatransform use the below logic :

When suffix= M

Set .ConvertedValue = @String.format(“%dM”, .YourInputProperty / 1000000)

When suffix=k

Set .ConvertedValue = @String.format(“%dK”, .YourInputProperty / 1000)

Otherwise

.ConvertedValue = .YourInputProperty