Create a count on a tab in form

  • 0
  • 1
  • Question
  • Updated 8 months ago
  • In Progress
Is there a way to create a count on a tab in a form?

I have a form with a few tabs that have reports. I want to show the total number of records on the report on the tab itself.
Photo of Chad Brandmire

Chad Brandmire

  • 968 Points 500 badge 2x thumb

Posted 10 months ago

  • 0
  • 1
Photo of Dan

Dan

  • 140 Points 100 badge 2x thumb
I was waiting for someone to say you couldn't do this but alas nobody came forward. Using the IOL technique and something like this will do the job:

$.get(dbidTable, {
  act: "API_GetNumRecords"
}).then(function(xml) {
  var numRecords = $("num_records", xml).text();
  $("#tab_t1_link a").append(` (${numRecords)`);
});

Notes:

(1) This is only the essential code. You will have to modify the code for your specific parameters and repeat the code for each child table.

(2) The above code will append to the tag name a string counting the number of child records in parentheses:

Tab 1 (100)  Tab 2 (200) ...
(Edited)
Photo of Chad Brandmire

Chad Brandmire

  • 938 Points 500 badge 2x thumb
Can't seem to get your code to work. Any suggestions? Can you post more details?
Photo of mkosek

mkosek

  • 776 Points 500 badge 2x thumb
I think I may be looking for the same solution. I have attached a photo of what I am after. Is this code the way to making it happen? I am familiar with Rules and formulas, however coding is far beyond my skill set at this point [I don't even know where to enter codes]. can someone walk me through this?