Get Select list Item value in IG report column for DML operation

409 views Asked by At

I have a Select list filter on the top of the page. I want its return value to get into any column which I create in IG report automatic DML process.

enter image description here

Suppose, Select list has a value "Step", when I add a row in IG report, that value should be saved into DB for one column which is hidden on UI.

I tried but sometimes it stores the value which I selected in Select list item as my last selection not the current one. Do I need to create Application item for this? Please help. TIA

1

There are 1 answers

0
Koen Lostrie On

In this case there is a table ig_tickes with a status column. On the page there is a page item P131_STATUS (select list) with values "OPEN" and "CLOSED". There is an interactive grid on table ig_tickets with column STATUS hidden. Functionality is that user selects a value from the select list and then clicks "Add Row".

  • Give the interactive grid a static id of "tickets"
  • Create a dynamic action on change of P131_STATUS with a true action of type "execute javascript code" and code:
var model = apex.region("tickets").call("getViews").grid.model;
model.getOption("fields").STATUS.defaultValue = apex.item( "P131_STATUS" ).getValue();

That's all there is to it.