Shay Shmeltzer's Oracle Development Tools Tips

Getting Additional Values from a Select-Single Component

Shay Shmeltzer
Director of Product Management - Oracle

With newer versions of Oracle JET we are recommending using the new select-single instead of the old (and deprecated) select-one component. In a past blog entry about tips for using lists in Visual Builder, I showed how to get additional values from the record you selected in a select single. I figured I owe you an update that shows how to achieve the same thing with a select-single. 

When you bind a select-single to a set of options, beyond selecting the value and the label, you are also able to select additional fields that will construct the row of data. In the demo below for example I use id for the value, name for the label, and then add salary as the additional field. The select-single expose an event for value-item change. The payload for this event include not just the key selected, but also "data" - which has all the fields in the record you chose.

You can then simply get their value in the action chain using something like $action.variables.data.fieldName - so in the video below I'm using the $variables.data.salary to get the value of the salary for the selected employee and then assign it to another variable on the page.

Join the discussion

Comments ( 1 )
  • Server Demir Tuesday, October 27, 2020
    Can i add two fields on one Select Single box line . For example, i want to see the Id of the employees and name on the same LOV line instead of one field which is name.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.