For each loop, type into, string array

I need to give an input box where the user updates string of values example -YY, AB, CD… sepearted by a comma. I use a for each loop to run each string i need to use a type into activity for each string how do i write that?

Hi,

You can split the input provide by the user and the output of split will be array. Now, you can iterate through array using for loop and put the type into activity inside that for loop and provide the current element array as parameter to type into activity.

Hi @RACHEL_PAUL

Check out the XAML file

image

UserInputMulitiple.xaml (5.6 KB)

Regards
Gokul

Instead of Message box use Type into activity @RACHEL_PAUL

You can refer this.

Thank you for the response i will check and get back to you on this.

I need to store these values in a excel sheet but it does not store only the last value does

Which activity did you used? Can you share the Screenshot of your workflow?

The type into works perfect but i need to store the values of strings in a excel sheet how do i do that

can you share the details of “How you want to save data in Excel”?

Under a column called colA

You can use append range activity to do that. OR you can maintain one datatable and add row in it every time. Place it inside the loop only.

Hi @RACHEL_PAUL

You can try with Add Data Row activity

Please elaborate with screenshot and data

Capture

i want the output to look like this, how can i achieve that?

i attached a sample xaml
Main.xaml (17.2 KB)
Input.xlsx (9.5 KB)

Hi @RACHEL_PAUL ,

Could you let us know what would be the Input for this Dialog ?
image

How are you adding the values or in which format.

U can give A,B

@RACHEL_PAUL ,

Could you check the below modified workflow :
Main.xaml (19.3 KB)

I have used a Linq approach for this operation as it seemed convenient to use it, than looping and adding the values to a list and preparing it in the output format.

I have commented UtMarks For Loop and used a Linq expression to get the format to match as the output.

Let us know if you are still facing issues or do you wish to revert back to the old approach.

@supermanPunch

if i give another input box for comments how to i write assign activity in the for each loop?

@RACHEL_PAUL ,

Considering already that a Column called Comments is present, then we can use the same method to populate the data into the Comments column.
image

Check the below updated workflow :
Main.xaml (21.0 KB)

Let us know if it doesn’t work or is not the expected outcome.