cancel
Showing results for 
Search instead for 
Did you mean: 

How does RAP obtain the values in the filter box?

lqj111
Discoverer
0 Kudos

I want to obtain the values in the page filter box and fill them in the corresponding positions on the creation interface. Is there any good way?

View Entire Topic
DiegoValdivia
Participant
0 Kudos

Hi,

I'm not sure if there's a way to achieve this using only RAP code.

Though, I think this is possible using a controller extension:

First, get the FilterBar ID using UI5 Inspector.

In my case, I have the following filters:

And this is the Filterbar ID shown in the UI5 Inspector

Then implement an extension:

  1. Use Open Guided Development to create a custom button
  2. Add code to get the Filter bar Instance using this.byId()
  3. Get all Filter values using Filterbar method getFilterItems(). In my case, such method returns Created On filter:

  4. Use Extension API + method invokeActions to call a RAP Static Factory action to create your business object. Send the filter values as parameters
  5. Navigate to the newly created business object using Extension API + Navigation Controller

I hope this helps.

lqj111
Discoverer
0 Kudos

Thank you for your answer ,Diego Valdivia, but I would rather implement it in the behavior implementation class.

rammel_sapdev
Participant
0 Kudos
Hi @lqj111, have you resolved this issue?