Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
oracle Apex Interactive grid

I have a interactive grid. If no rows selected I want to display a error msg as 'No records selected'. If more than 1 record selected then display 'select 1 record'. If 1 row selected then call a procedure. How can I achieve this using Java Script?

The error message should appear as inline notification.

I have tried this code. But this doesn't give correct error message. If I try clicking one record it is giving correct error msg then if I click one more record the error msg is incorrect. I mean whatever error I'm getting for first time I'm getting the same error always.

var gridView = apex.region("your-IG-static-id").widget().interactiveGrid("getViews").grid;

var records = gridView.getSelectedRecords();

var recs = records.length;

if (recs = 0) {apex.message.alert("No records selected")};

if (recs > 1) {apex.message.alert("Select 1 record")};

if (recs = 1) {
    apex.server.process("CALL_YOUR_AJAX_PROCESS", {

        x01: $v("PAGE_ITEM_1") ,// Parameters to pass to AJAX process if any

        x02: $v("PAGE_ITEM_2") ,// Parameters to pass to AJAX process if any

      }, {

        //pageItems: ''

        //dataType: 'text'

      }).done(function (pData) {

        console.log(pData);

      });

};
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!