Dynamically ordering of rows

Introduction

          This post will help you to sort the rows in tabular form dynamically.

 

Steps to follow

 

Step 1:

Create a tabular form with the query and add a null column at last.

Step 2:

Report attributes à NULL column à HTML Expression

 

<img id=”down_#ROWNUM#” style=”cursor:pointer;”

onclick=”f_row_down(this)”

src=”/i/arrow_down_gray_dark.gif” />

<img id=”up_#ROWNUM#” style=”cursor:pointer;”

onclick=”f_row_up(this)”

src=”/i/arrow_up_gray_dark.gif” />

 

Step 3:

Give display as Standard Report Column

Step 4:

Add below functions in the page header for changing the rows order.

 

Function : 1

 

function f_row_down (pThis, a)

{

//alert(a);

$(“#P23_Y”).val(a);

html_RowDown(pThis);

apex.submit(‘DOWN’);

}

 

Function : 2

 

function f_row_up (pThis,pThat,a)

{

html_RowUp(pThis);

$(“#P23_Y”).val(a);

apex.submit(‘DOWN’);

 

}

 

Call To Action:

For Oracle apex development and customization please do contact our company website https://doyensys.com/

 

Conclusion

         Using the above method, we can achieve dynamic row sort in tabular form.

Recent Posts