Skip to Content
author's profile photo Former Member
Former Member

Multiple search by ID. Search not knowing full ID. Sapui5


I was wondering if there was any option to search an element by its id but not knowing the full ID, only part of it. So I could find an element without knowing its full ID or find multiple elements with similar IDs.

For example if I knew I had 3 objects with the followings ID:

"objectID1" "objectID2" and "objectID3".

Could I something like:


I have tried it in JavaScript using:

"input[id*='PART_OF_ID_I_KNOW']" But it returns an HTML object and I need it for SAPUI5. Could I use something like: var myControl = sap.ui.getCore().byId('myId'); but not having to match the full ID (myID)? Thanks.

Add comment
10|10000 characters needed characters exceeded

  • In UI5 I'm not able to identify a scenario where this is required(even in jQuery I cant make a use case out of this).

    Let us know the scenario you are trying to solve so that anyone in the forum can provide a better alternative.

0 Answers