Creating a list of document numbers

I have a list of numbers that have been imported into a data table. Now I need to put these into an array and I will need to separate them into separate array depending on whether there is a blank row anywhere between the first and last document number.
Can anyone help???

can you share some sample data along with some additional elaboration on your case? Thanks

Sure. I have a list of document numbers.



I need to create an array for each set that is separated by a blank row and then put them into a string as such:

Hi @karen.c.stewart4.civ ,I hope you are doing well.
For your current problem I am attaching a workflow as well as the sample excel file which will help you to get your solution. Remember the “output_list” will have your desired output in logs. (8.7 KB)

Have a good day!

Thanks & Regards,
Shubham Dutta

That looks amazing. Once I get each list created I will need to set those up together as a string to be used as input for a field. Something like (101,103),(105,108),(110,112). Is that possible?

Hi @karen.c.stewart4.civ

Read the data excel file using the Read Range in which the first column contain the list of numbers (dt)

Assign the below to a string variable (ResultStr)

ResultStr =

String.Join(", ", String.Join("-", dt.AsEnumerable.Select(Function(r) r(0).ToString.Trim)).Split({"--"}, StringSplitOptions.None).Select(Function(x) "(" & x.Split("-"c).First & "," & x.Split("-"c).Last & ")"))

Hi @karen.c.stewart4.civ ,
absolutely that can be done I have updated the workflow for you reference,
you can get the required output as “output_str” which will be displayed in logs. (8.8 KB)

Thanks & Regards,
Shubham Dutta

Thank you so much!!! This was exactly what I needed and it works great!!! I appreciate the help so much!

1 Like

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