I need some assistance with a UiPath task I’m working on. I have a single cell containing multiple ID/code pairs, separated by newline characters. Here’s an example of the content in the cell:
My goal is to extract each ID/code pair (not the entire pair - e.g. ID001 - IBUS0301A16 only) and save it into a separate variable using UiPath’s Assign activity. Can you provide me with guidance or best practices on how to achieve this? Any help would be greatly appreciated.
if you’re expecting a fixed number of variables, then you can just keep it simple and use a multi-assign statement instead, in which you can set the variables as:
I don’t see the benefit of using a loop if ultimately you always have a fixed amount of values.
The loop makes sense if you want to make your procedure more dynamic (for example, if the number of values changes, or if you want to apply the same exact behavior in the body of the loop for each value, which is not your case because you’ll have to hard-code the target variable names anyway).