How to: Filter data using multiple attributes in VBCS

Sumedh Chakravorty
2 min readDec 16, 2019

Photo by Markus Spiske on Unsplash

Out of the box, in VBCS the filtering will be enabled for the label attribute specified in options-keys.label for controls like oj-select-one oj-select-many oj-combobox-one oj-combobox-may. What if you want to filter the data based on some other attributes or multiple attributes?

Using Service Data Provider Transforms

Each of the above controls, when created using from a rest endpoint will have service data provider (SDP) variable created. In this example we will use transform functions to manipulate the auto-generated query which by default uses the aforementioned label attribute.

oj-select-one with options fetched dynamically from an endpoint via service data provider

Select the {} to view the page metadata json where you can locate the lovListSDP variable. Make the below changes to it to enable transforms.

Enabling transforms for Service Data Provider

Define the requestFilter and responsePaginate functions in your PageModule, this is where the request and response will be handled.

For the demo, user entered values in the Select One will be queried against the fields: tag, description and name (which is the label)

Additionally…

Based on your requirement, you can also utilise the other transform functions such as sort, paginate, query, select, body for request transform and body for response transform.

Version

VBCS: 19.1.3

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Sumedh Chakravorty
Sumedh Chakravorty

Written by Sumedh Chakravorty

Product Manager for Oracle Visual Builder.I talk about Oracle JET, VBCS, React, React Native, Spring Boot. Views are my own.

Responses (2)

Write a response

Will it work for case insensitive searching?

--

Do you have example for pagination using SDP with REST endpoint?

--