Split string in one column to row

Hi,
I have data in the Excel with 3 columns, i.e.:

Name - Age - Phone numbers

James - 45 - 97867531, 4567890, 23456789
Jen - 43 - 234557, 345567

Phone number data is inputted into one column, segregated by comma in the excel.
One person can have multiple phone numbers.

I need to input phone numbers to the app as diff phone number has diff row on the screen.

If A has 3 phone numbers then it will have 3 rows.
If B has 2 phone numbers than it will have 2 rows to input.

When I input the data to the system I will use for each to input data for each person.
Can someone please advise how to handle the phone number input?
By default the screen will only show first phone number field.
If there are 3 phone number then I need to click add button accordingly.

@youlee0901,

You can use split method string for phone number,
// Declare string array variable.
strPhoneNumberArray = row(““PhoneNumbers”).tostring.split((New Char() {”,"c})

// Check first lengh of array before looping.
if strPhoneNumberArray.length >= 1 {
// Iterate over phone number array
for phoneNo in strPhoneNumberArray {
// do what u want
}
}

Cheers,
Pankaj

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.