X

Shay Shmeltzer's Oracle Development Tools Tips

Creating Dependent/Cascading Select Lists with Visual Builder

Shay Shmeltzer
Director of Product Management - Oracle

A common requirement in applications is to have dependent lists (also known as cascading lists) - meaning have the value selected in one place influence the values that could be select in another place. For example when you select a state, we'll only show you cities in that state in the city list.

In the short demo video below, I'm showing you how to implement this cascading lists solution with the new Visual Builder Cloud Service.

The solution is quite simple

You catch the event of a value change in the first list, and in the action chain that is invoked you set a filterCriterion on the second list. (See this entry for a quick introduction to filterCriterion).

Since the list is connected to a ServiceDataProvider, there is no further action you need to take - the change to the SDP will be reflected in the UI component automatically.

Quick tips - make sure you reference the id of the column and that your operators are properly defined and enclosed in double quotes.

 

Join the discussion

Comments ( 7 )
  • Faisal A Ansari Wednesday, June 6, 2018
    How can I can capture the label of the drop down upon its select event. This is in case, for example, if I want to map the label to another variable.
  • Shay Friday, June 8, 2018
    A blog showing how to get the label of the selected value in a drop down here - https://blogs.oracle.com/vbcs/getting-the-labeldescription-value-from-a-select-list-in-visual-builder
  • Prathap Wednesday, June 12, 2019
    This does not work now. Do you know if the approach has changed.
    Even after I assign the value state to the City SDP it does not filter and show all City and does not consider the State selected
  • Shay Shmeltzer Wednesday, June 12, 2019
    Prathap,
    This should still work - check out your browser network tab to see which REST call is being executed to get the filtered values. If you are running into issues post on our forum with more details about what you see: https://cloudcustomerconnect.oracle.com/resources/e610f4723c/summary
  • Subramanian Sunday, September 8, 2019
    I have followed the same approach as suggested in the blog, the dependent list is also showing properly. But if I search with a value which is not one of the value in the filter, its listing the value and I am able to select and use that value. The list is showing the filtered values but we are able to search the list with unfiltered values
  • Moenish Monday, February 24, 2020
    Hello Shay,

    I have a issue using the dropdown option in VBCS.

    The thing is that we want to have multiple dropdowns based on a field of our Business Object.

    But when doing that, we cant filter the second dropdown list on the first one, it returns all the values from that field instead of the one based on the first dropdown.

    To make it clear, the first dropdown contains the customer name, the seond dropdown needs to contain the name of a application based on the customer name.

    Do you know a way to solve this?
  • shay Monday, February 24, 2020
    Moenish,
    This blog shows exactly the scenario you are talking about. If something doesn't work, have a look at the network tab to figure out what REST call is being executed when you change the value in the first drop down, and how it populates the second list.
    Further help is on our discussion forum.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.