Skip to content

Latest commit

 

History

History

button_display_number_of_records

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Display the Number of Records on a Button

Displaying the number of records on a button can be useful if you want to know how many records are shown in a Browse Screen without having to open the form first.

☛ Add a Display Object to your form together with a SQL query to count the number of records in a table. The object’s ID is displayCustCount in this example. Set its access to Hidden once you get it set up.

☛ On your Screen​ you would have a Button​ called buttonCustCount

☛ Add this code to your form’s JavaScript field and replace the IDs with your own ones. ❓ How to add Custom Code

if (nuFormType() == 'edit') {
    var btn = $('#buttonCustCount');
    btn.html(btn.html() + ' (' + $('#displayCustCount').val() + ')');
}

Result: The number of records is displayed on the button.