Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I get a checkbox to function as a row selector on a classic report or interactive report.

user1.0Apr 10 2018 — edited Apr 13 2018

Preface - I cannot use the interactive grid.

I have created an interactive report and implemented a solution to add a check box using an example from John Synder's blog.

That part works great.

However, his example allows the user to select multiple rows and I need to only allow 1 row to be selected - similar to the way the interactive grid master/detail relationship would function.

I've saved the value of the column from the last checked row in a page item P1017_SELECT.

I have a static id on my region P1017SCENARIOS

My thought is that I could go line by line in my region and check the column value of the checked row against the saved value and then uncheck the row if the current value of a column doesn't match the saved value.

Assuming this reasoning is correct, how can I get the value of the of the column value based on the row?

var cb$, checked, allRows$,

    sel$ = $("#P1017_SELECT"),

    event = this.browserEvent,

    target$ = $(event.target),

    tr$ = target$.closest("tr");

allRows$ = $("#P1017SCENARIOS").find("td input");

if (allRows$.filter(":checked").length > 1){

  for (var rownum=1; rownum<=allRows$.length;
rownum++)

      {

          cb$ =tr$.find("td").first().find("input");        
          checked = cb$[0].checked;        

      }   

}    

This post has been answered by user1.0 on Apr 13 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2018
Added on Apr 10 2018
2 comments
3,402 views