I am looking for some guidance on a small piece of “code” for my RPA project.
I havent worked with collections of strings before and therefor am looking for some guidance in developing this small process code.
I need to figure out, how to create and add a string to a collection - and in the end, i need to examine the collections for any inconsistens. I am expectiong all strings to be equal and contain only numbers.
Could anyone help me out with some guidance?
Cheers
@JDK
Doing IT with a String list
Define a variable of Datatype(of String)
And init IT within assign Activity or Default value with: new Datatype(of String)
Adding a String can be done with the add to collection activity
Values comes from get text activites, which are placed in a loop for X times.
By adding a string - or number - to a collection i Can compare when loop is over
@JDK, I am happy to help you out… Kindly share the input text and logic based on which you want to do comparisons… I will share the regex pattern to you.
we can do this with the help of ADD TO COLLECTIONS activity where the input string to be added must be mentioned in item property and the list or collections variable in collections property
–and change the type argument as STRING
and for this
for this use a assign activity like this str_input = listvariable(0).ToString
–then use a FOR EACH activity and pass the above variable listvariable as input and change the type argument as string
–inside the loop use a IF condition like this Isnumeric(item.tostring) and str_input.Equals(item.tostring)
only if both these condition passes it will go to THEN part of IF condition or goes to ELSE part
I am not able to clearly understand what you are trying to do. Can you clearly produce the scenario like, Input, Conditions Needs to be applied and Output. So that i can help you out.