Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
select single not populating in ADP table. — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

select single not populating in ADP table.

Received Response
12
Views
1
Comments

Summary:

I have an ADP table in which one of the columns is a Select-Single template. The select-Single has a

CollectionTemplate as Table. When the data loads in the table, the CollectionTemplate Table is not dropping in the select-single.

Content (required):

I have a table with an ADP variable bound to it whose type structure is

I want to display the Price array as a Select-Single dropdown in the table as one of the columns(baseprice column).

Thia the code for select-single component in this table.

 <oj-table scroll-policy="loadMoreOnScroll" class="oj-flex-item oj-sm-12 oj-md-12"
      columns='[{"headerText":"productcode","field":"productcode"},{"headerText":"description","field":"description"},{"headerText":"pack","field":"pack"},{"headerText":"schedules","field":"schedules"},{"headerText":"baseprice","sortable":"disabled","template":"multiFieldCellTemplate5"}]'
      data="[[ $variables.itemLinesDataADP ]]">
  <template slot="multiFieldCellTemplate5"><oj-select-single id="deals" data="[[ $functions.createADPData($current.row.price) ]]" item-text="baseprice">
      <template slot="collectionTemplate">
      <oj-table style="z-index:1000" scroll-policy="loadMoreOnScroll"
        data="[[ $functions.createADPData($current.data) ]]"
        columns='[{"headerText":"BasePrice","field":"baseprice"},{"headerText":"MIN","field":"min_tier"},{"headerText":"MAX","field":"max_tier"},{"headerText":"Bonus","field":"bonus"},{"headerText":"Discount","field":"discount"}]'></oj-table>
      </template>
      </oj-select-single>
 </template>
    </oj-table>
define(["ojs/ojarraydataprovider"], (ArrayDataProvider) => {
  'use strict';

  class PageModule {

    createADPData(data) {
      console.log(JSON.stringify(data));
      console.log("data received" + data[0].baseprice);
      let dataprovider = new ArrayDataProvider(data,{ keyAttributes: "bonus",});
      console.log("data Sending back"+ JSON.stringify(dataprovider));
      return dataprovider;
  }
  }

  return PageModule;
});

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!