skip to Main Content

I added a JavaScript function to capture the ROWID of the rows that are selected in the GRID and passed it to a page item.

var gridView = apex.region("emp").call("getCurrentView"),
    selectedRecords = gridView.getSelectedRecords(),
    idValues = "";

for (var i = 0; i < selectedRecords.length; i++) {
    var record = selectedRecords[i];
    var idValue = record[0];
    idValues += idValue;

    if (i < selectedRecords.length - 1) {
        idValues += ",";
    }
}
$s("P43_ROW_SELECT", idValues);

However, I need to use the values ​​that this item receives in a process (server side), so I have to submit the page first so that the item actually receives the values, so that I can use them in the process.

My question, if it is possible to pass the values ​​that the item receives in my process in PL/SQl (server side), without the need to submit the page, is there another way besides submitting?

2

Answers


  1. Chosen as BEST ANSWER

    Thanks for the help, I did it differently, instead of passing it to a page item, I passed it as a parameter in the process call, something like this:

    apex.server.process( "processSubmitAjax", {
        x01: idValues 
    },
    {
       [...]
    }
    

    And I called in the process

    DECLARE
      l_x01         VARCHAR2(100);
    BEGIN
      l_x01 := APEX_APPLICATION.G_X01;
    
    [...]
    

  2. You could use an AJAX process as explained in the docs, check the apex.server.process function here.

    Another solution, the best fitting one, would be to add a Execute Server-side Code action to your DA and to list the item (P43_ROW_SELECT) in the Items to Submit section. Here you can find a more detailed explanation.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search