Page 1 of 1

Returning string array values

Posted: Sun May 17, 2020 2:03 pm
by theraviz
Hi,

I have a user code which returns multiple string values as a string array. Now I need to retrieve this values in a recording action.

With one returning variable, it is easy to go to the properties and assign it to a binding variable. How to solve this case when it returns multiple values?

Re: Returning string array values

Posted: Mon May 18, 2020 8:21 am
by odklizec
Hi,

I'm afraid, there is no way to automatically parse array of strings and bind them to module variables. In your user code, which I suppose is located in your recording in question, you will have to split the array into individual values and then assign each value to each recording variable of your choice. For splitting string, you can Split method. Check for example this page with sample:
https://docs.microsoft.com/en-us/dotnet ... sing-split

Re: Returning string array values

Posted: Mon May 18, 2020 8:22 am
by Stub
Indexing parameter to request the nth item?
Comma-separated return value that another code module can then parse into separate values?

It depends what you're doing and how you're doing it.