FrankB Posted March 18, 2016 Report Share Posted March 18, 2016 When there is only one record found on the Details DataPage, users will not see a record counter screen of "Record 1 of 1". The counter only shows when there are at least TWO records to show: I need to find a way to display "Record 1 of 1" when it is applicable. Can anyone point me to the JS I would need to do this? I know it's probably pretty simple, but I'm kind of a JS newbie and I didn't see this issue solved anywhere else on the forum. Quote Link to comment Share on other sites More sharing options...
Jan Posted March 21, 2016 Report Share Posted March 21, 2016 Hello Frank, Welcome to the forum! I have written the following script. You can add a Header&Footer element, select the Footer element, click the Source button and paste the code: <script> var myTables = document.getElementsByTagName("table"); var onlyOneRecord = true; var navTable = ""; for (i=0; i<myTables.length;i++) { navTable = myTables[i].getAttribute("data-cb-name"); if((navTable=="cbFormNavigationTableTop")||(navTable=="cbFormNavigationTableBottom")) onlyOneRecord = false; } if (onlyOneRecord) document.write('<center><span class="cbFormNavigationCell cbFormNavigationMessage">Record 1 of 1</span></center>'); </script> You can change the code <center><span class="cbFormNavigationCell cbFormNavigationMessage">Record 1 of 1</span></center> as you want. I hope, it helps. FrankB 1 Quote Link to comment Share on other sites More sharing options...
FrankB Posted March 22, 2016 Author Report Share Posted March 22, 2016 Works very well for my purposes. Thank you very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.