Skip to Content

How to pick an item from dropdown menu with iRPA?

Hello all,

The dropdown menu that I am trying to manipulate is located in SAP Service Provider Cockpit / Monitoring / Tickets.

I have created a custom query for filtering the tickets. It was saved as a new item in the dropdown menu on the top of the page. When I capture the dropdown menu with iRPA I am able to set the name of the query, but list is long and scrolling is need in order to find my custom query on the bottom of the list.

Is there other way to set the name of the query that I need, or I have to scroll to end and pick the last one(and how to pick it when I dropdown.jpgget more custom queries)?

dropdown.jpg (31.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 20, 2020 at 03:46 PM

    Hi - What I know of is : you have to use the method "execscript" of the page entity. Considering it to be a Fiori App, the statement could be like this: -

    var stmt = 'sap.ui.getCore().byId("' + <application name>.<page name>.<item name>.scriptItem('id') + '").getSelectedKey();'; 
    var sKey = <application name>.<page name>.evalScript(stmt);
    
    stmt = 'function(){sap.ui.getCore().byId("' + <application name>.<page name>.<item name>.scriptItem('id') + '").setSelectedKey("<drop down key value>");}, 0);';
    <application name>.<page name>.execScript(stmt);

    Thanks & Regards

    SR

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2020 at 11:28 AM

    Hi Ivaylo,

    We need to save one item of the dropdown as a page item and tick the occurs flag so that it recognizes the complete list of dropdown items.

    Now we loop this list to click on the required item.

    var itemCount=FG.pFieldglassCreateCo.LIcurrency.count(); // LICurrency was the name of the item

    for(var j=0;j<itemCount;j++) {

    if(FG.pFieldglassCreateCo.LIcurrency.i(j).get()=='YOUR ITEM NAME'){

    FG.pFieldglassCreateCo.LIcurrency.i(j).click();

    break;

    }

    }

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.