Two Arrays into one string

Hi,

I am using two array in different assign activity

Assig activity1: FName = {“A”,“B”,“C”}
Assig activity2: LName = {“X”,“Y”,“Z”}

Output i want is:

The first name is A the last name is X

You can use the for loop to loop through the length of the array and pass the index to both the arrays so that it will pick up the index values in both the array @heena_shaikh

Hi Hareesh,

Please find the below files tried using for loop

Regards,
Heena

Main.xaml (8.8 KB) Names.xlsx (8.6 KB)

Hi
Hope these steps would help you resolve this
Use a WHILE LOOP and mention like this
counter < FName.Count and counter < LName.Count

Where counter is a variable of type int32 with default value as 0 defined in the variable panel

—inside the loop use a writeline activity like this
“The first name is “+FName(counter).ToString+” the Last name is “+LName(counter).ToString

This will get all the values from both array where both FName and LName is a variable of type array of strings

—next to this writeline activity use a assign activity like this
Counter = counter + 1
Cheers @heena_shaikh

1 Like

@Palaniyappan thank you for the solution it worked but the output is repeating for single value

please find the attached

image

1 Like

Where this step included to your while loop
Cheers @heena_shaikh

Kindly let know for any queries or clarification
Cheers @heena_shaikh

even after including counter into assign activity problem persist

Main.xaml (5.6 KB)

1 Like

you wer almost done
kindly keep the assign activity inside the while loop
image

Cheers @heena_shaikh

2 Likes

thank you so much @Palaniyappan it worked :smiley:

1 Like

Cheers @heena_shaikh

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