How To Convert List To Array In UiPath

Converting one datatype to another is one of the most common things we do in programming.

Let’s see how to convert a list to an array and Vice Versa…

1. Convert List to Array
2.Convert Array To List


1. Convert List to Array

our_Array = our_List.ToArray

Example:

Implementation using UiPath :

Let us implement a workflow which converts “List” to an “Array”

Step 1:
Create variables as shown below

UIpath Convert list to array 1.PNG

Step 2:
Drag “Assign” activity into the design panel and initialize the list of string type.

UIpath Convert list to array 2.png

Step 3:
Drag another “Assign” activity into the design panel
Use the above-mentioned code and its done.

UIpath Convert list to array 3.PNG

Click here to download the Source Code…


2. Convert Array to List

our_List = our_Array.ToList

Example:

Implementation using UiPath :

Let us implement a workflow which converts an “Array” to “List”

Step 1:
Create variables as shown below

UIpath Convert list to array 1.PNG

Step 2:
Drag “Assign” activity into the design panel and initialize the Array of string type.

UIpath Convert array to list 1

Step 3:
Drag another “Assign” activity into the design panel
Use the above-mentioned code and its done.

UIpath Convert array to list 2.PNG

Click here to download the Source Code…

Hope it has helped you… 

 

 

1 thought on “How To Convert List To Array In UiPath

  1. vinay muthyapu

    Excellent bro

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: