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

Restrict File Upload by File Type in Oracle Apex

If you want to restrict file upload by file type/extension/format you can follow the below steps.  Goto File Browser Item --> Advanced --...