Search This Blog

Wednesday, February 7, 2018

Serial Number In Tabular Form Automatically Using JavaScript in Oracle Apex 5.1

1.  Copy Pest this JavaScript Function to Page HTML Header.

<script>
function serial_num() {
    
  var highest=0;
  $(".serial").each(function(){
    if (this.value != "") {
      highest=Math.max(highest,parseFloat(this.value));
    }
  });
  $(".serial").last().val(highest+1);
}
</script>

2.  Tabular column -> Column Attributes-> Go to Serial Column Attributes -> Element CSS Class

->   serial

3.  Add serial_num() JavaScript function to Button URL Target .

javascript:{apex.widget.tabular.addRow();serial_num();}

No comments:

Post a Comment

Check Difference Between Two Database Objects

Step-1. Create Two DBLINK to connect with Two Database then Step-2. define logindb= DBLINKONE define remotedb= DBLINKTWO define schema_name=...