Shay Shmeltzer's Oracle Development Tools Tips

Tips and Tricks for List of Values in Visual Builder Cloud Service

Shay Shmeltzer
Director of Product Management - Oracle

While working on some customers' applications, I ran into a few performance and functionality tips related to list of values in Visual Builder Cloud Service (VBCS). While it is very tempting to use the built in quick start that binds a list to results from a service, in some cases you might want to take a different approach.

One reason is performance - some lists don't change very often - and it makes more sense to fetch them only once instead of at every entry into a page. VBCS offers additional scopes for variables - and in the demo below I show how to use an application scope to only fetch a list of countries once (starting at 1:15). I also show how to define an array that will store the values of the list in a way that will allow you to access them from other locations in your app, and not just the specific UI component.

The other scenario that the demo shows relates to situations where you need to get additional information on the record you selected in the list. For example, your list might have the code and label but might contain additional meaningful fields. What if you need access to those values for the selected record?

In the demo below (6:40), I use a little JavaSciprt utility method that I add to the page to get the full details of the selected record from the list. The code used is (replace the two bold names with the id field and the value you want to return):

PageModule.prototype.FindThreeLetter = function(list,value) {
 return  list.find(record => record.alpha2_code === value).alpha3_code;

In the past, any array used for an LOV had to have "label" and "code" fields, but Oracle JET now allows you to set other fields to act in those roles this is shown at 5:54 using the options-keys property of the list component - a combobox in my case.

Check it out:

Join the discussion

Comments ( 2 )
  • Sriram Iyer Thursday, October 4, 2018
    Hi Shay,
    Thank you for all of these articles on VBCS. We are just starting a project and are planning to use VBCS as our tool for SaaS Extensions. I am new to VBCS and your videos and the YouTube channel are a big help.
    I noticed on some of the demos that when you create a Business Object, one of the field types could be a link where you could specify a pre-defined list of values for the field, for example, Active and Inactive. I don't see that option any more. I am using the following release
    Version: 18.3.3
    Build Number: c322d9c0b0947265c87e1df8985c223b7cff1461 (2018-09-02 21:27:50)
    Runtime Version:
    JET runtime version: v5.1.0.

    Any input you can provide will be very helpful.

    Sriram Iyer
  • Shay Thursday, October 4, 2018
    Sriram - a better place for technical questions is our forum here: https://cloudcustomerconnect.oracle.com/resources/e610f4723c/summary
    You can create Business Objects that have the list of values you want, and then have one business object field refer to them. VBCS will then create the list in the update/create pages for that field. See the demo here and look at how the category field is defined in the travel request: https://youtu.be/NFKdUyv-Gbs?list=PLSKf-atSzZejAz7ZIIWTWXEnX5M_Co7AV&t=174
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.