Enter your keyword

post

Select One with unique data in Oracle Visual Builder

Select One with unique data in Oracle Visual Builder

Select One component is one of the seeded Oracle JET (OJET) components that allow us to populate data from backend API or Business Object or static. The data we receive from API or Business Object can have duplicate records and before we populate Select One, we may need to filter the duplicate data and populate select one choice with unique data.

Select One in Oracle Visual Builder

So to meet this requirement, I have captured an end to end video that will help you to achieve the requirement.

https://youtu.be/m35zi9wzkeY

Below is the snippet of JavaScript code to filter the duplicate data.

PageModule.prototype.unique = function(result) {
    var uniqueResult = [];
    var final = [];
    if (result && result.length > 0) {      
      for (var i = 0; i < result.length; i++) {
      if( !uniqueResult[result[i].department])
       {
          final.push({
           
            department: result[i].department,
            departmentName: result[i].departmentName,
          });
          uniqueResult[result[i].department] = 1;
        }

      }
     
    }
    return final;
  }

Subscribe to my YouTube channel to get the latest videos on your notification list directly.

View more interesting videos

Get logged-in user credentials in Oracle VBCS

Export table data to Excel in Oracle Visual Builder

Editable table in Oracle Visual Builder Cloud Service

One Comment

  1. Reply

    […] Select One with unique data in Oracle Visual Builder […]

Leave a Reply

Your email address will not be published.