Forum Discussion

IndraO's avatar
IndraO
New Contributor
2 years ago
Solved

Find methods with array's of properties and values doesn't work

I saw in the documentation that you can pass along multiple properties in some of the Find methods. I have now tried to implement this twice and I still can't get it to work.   I'm trying to find a...
  • rraghvani's avatar
    2 years ago

    I've used the Object Spy tool to find the following object.

    And the coding works using pathname as opposed to href

    function Test()
    {
        var PropArray = new Array("pathname", "VisibleOnScreen");
        var ValuesArray = new Array("/223/BulkAnnuity", true);
    
        var item = Aliases.panelDashboard.Find(PropArray, ValuesArray);
        if (item.Exists) {
            Sys.HighlightObject(item);
        } else {
            Log.Error("Item not found");
        }
    }