How to assign variables to separated variables after using Split String

Hi all,

I have a column with variables that dynamically change

E.g. one instance it could be (1), another time it could be (1,2), and another time it can be (1,2,3)

I have used split string by separating them using comma.

However, following that, I would like to assign each number to a variable. However, since the numbers dynamically change - there is always an error.

How can i go about doing this?

you could use a dictionary to dynamically create ‘variables’. simply iterate through the array you’ve just created and use add to dictionary, then use dictionary.item(“key”) to acces your values.

2 Likes