Question
Tata Consultancy Services Ltd
IN
Last activity: 13 Sep 2017 6:27 EDT
How to convert integer array to String array?
Hi Team,
I want to convert integer array to String array?
Input array or Value of datatype is int : proxyAccessorId: [000264383, 000502171, 000490613],
I Want Output parameter Like : proxyAccessorId: ["000264383", "000502171", "000490613"],
Can you help on above..
Thanks,
***Edited by Moderator Marissa to update categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Barclays UK PLC
GB
if you wish to convert the integer array to string array, use Arrays.toString(int [] array).split("[\\[\\]]")[1].split(",","") and resolve it to a string array. avoid looping through each.
Pegasystems Inc.
IN
Hi Siva,
Can you please let us know what exactly your requirement ?
If you want to use these integer values as String values in propertySet or concatenation, PRPC should do this conversion automatically.....you don't need to do it explicitly.
Thanks & regards,
Venkat
Tetco
SA
Hi Siva,
When u have some integer values and if u want it to pass as string if you include inside quotes("") it considered as a string then why you need to convert it to string, if u r getting any specific error please post here.
Pegasystems Inc.
IN
Tata Consultancy Services Ltd
IN
Thanks for quick response..
Tetco
SA
Hi Siva,
Is your issue got resolved?
Accepted Solution
Barclays UK PLC
GB
if you wish to convert the integer array to string array, use Arrays.toString(int [] array).split("[\\[\\]]")[1].split(",","") and resolve it to a string array. avoid looping through each.
Tata Consultancy Services Ltd
IN
Hi Team,
My Issue is Resolved.
I set StringArray to Intiger type property then Pega Engine did auto datatype convertion.
Thanks once Again.
Tetco
SA
Thats good Siva, if possible please share screenshots it will be helpful for others who search for same thread.