Question
Last activity: 13 Jan 2017 9:34 EST
Convert Int to String
Are there any OOTB functions to convert Int to String?
***Updated by moderator: Lochan to add Categories***


Pegasystems Inc.
IN


Pegasystems Inc.
US
Hi,
I am not aware of any Pega OOTB function for simple "int to string" converstion. Can you just try Java String.valueOf(int) method?
Hi,
In a property-set of an activity or a data transform or even a java step
String_property = Integer_Property+""
This way the empty quotes will set a string value to the left hand side.
Regards,
Ratan Balaji.
Hello,
I couldn't find any OOTB function to acheive this requirement, however you may use the below methods in a Java step to acheive your requirement.
- Convert using Integer.toString(int)
- Convert using String.valueOf(int)
- Convert using new Integer(int).toString()


Pegasystems Inc.
US
Hi Malinda,
I would suggest you to use Integer.toString(int) as it is better way in terms of performance. String.valueOf(int) internally uses Integer.toString(int).
Reference - http://stackoverflow.com/questions/653990/what-is-the-most-efficient-way-to-convert-an-int-to-a-string
Regards,
Mahesh


Pegasystems Inc.
IN
Hi,
Please use Integer.toString(int) in a Java step to achieve your requirement.
Thanks.
Hello Malinda,
I hope you want this conversion in an activity you can write a java step and use toString() function which would do the trick .
You can use this conversion in many places so let us know where you want to use it exactly .
Thanks,
Arun