Hi,
I have an array like countryarray = {“US”,“Europe”,“Canada”,“Australia”,“Singapore”,“United Arab Emirates”}
and string like country = “Canada”
I want to check countryarray contains country string.
any solution for this??
Hi,
I have an array like countryarray = {“US”,“Europe”,“Canada”,“Australia”,“Singapore”,“United Arab Emirates”}
and string like country = “Canada”
I want to check countryarray contains country string.
any solution for this??
Hi @sams,
Use countryarray.Contains(country)
. you can put this statement inside an IF to check whether that country exists or not.
Please let me know if doesn’t work.
Regards,
Vikas
thanks for reply @pathrudu,
I had tried like countryarray.contains(counrty).
I have object in contains() argument.
@sams
you might be getting the object from for each? if yes you can change type argument in foreach activity to string from object and can use directly or you can use country.tostring
please check and let me know
@sams
are you getting error at final message box? i can’t run this process as i don’t have access to Linkedin.
but itried with different website i am getting perfect output. what issue are you facing here?
@pathrudu
In final message box it add or subtract the score.
if array contain the location then it add other wise it subtract the value
condition every time goes in else part.
No, its not working,
In array United Arab Emirates is there and location is also United Arab Emirates value,
it return false in message box .
can you please share the screenshots of your message boxes, because I could able to run it properly
you are taking last value of your array please check there might be “.” included.
did you used the file which i shared to you? please trim your location variable after assigning array variable so that all the spaces will be removed.
Yes, there is trim the value in location variable.
@sams
sorry, I am helpless as it is working on my machine properly
as of now i can’t i am in office
thankx @Manjuts90
can you pleae try out this:- https://forum.uipath.com/t/how-to-check-array-value-and-string-is-equal-in-uipath/28384/6?u=sams
@sams In that file some activities are missing bro.