cancel
Showing results for 
Search instead for 
Did you mean: 

Check if an object exists twice

SOLVED
Highlighted
Regular Visitor

Check if an object exists twice

Hi together!

 

On a webpage, i've got two picklists.

Currenty i find the objects within the picklist with the NativeWebObject.Find method.

Now i wan't to check, if there are two objects with the same SearchedText (one in the left, one in the right picklist...), but I don't know how.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Leader

Re: Check if an object exists twice

Hi @Timmey 

 

Without too much info on your exact implementation, I could suggest a general approach.  You may need to add an interim step find the two picklists individually first and then test in both of them using something like

 

var item1 = picklistleft.find[("SearchedText"],[sometext]);
var item2 = picklistright.find[("SearchedText"],[sometext]);

if(item1.Exists && item2.Exists)
{
return true;
}
else
{
return false;
}

-------------------------------------------------
Standard syntax disclaimers apply
Regards,

View solution in original post

1 REPLY 1
Community Leader

Re: Check if an object exists twice

Hi @Timmey 

 

Without too much info on your exact implementation, I could suggest a general approach.  You may need to add an interim step find the two picklists individually first and then test in both of them using something like

 

var item1 = picklistleft.find[("SearchedText"],[sometext]);
var item2 = picklistright.find[("SearchedText"],[sometext]);

if(item1.Exists && item2.Exists)
{
return true;
}
else
{
return false;
}

-------------------------------------------------
Standard syntax disclaimers apply
Regards,

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors