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?
Returning string array values
Re: Returning string array values
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
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
Last edited by odklizec on Mon May 18, 2020 8:26 am, edited 1 time in total.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Returning string array values
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.
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.