Alpha Video Training
Results 1 to 8 of 8

Thread: Count of total records in virtualized list

  1. #1
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,436

    Default Count of total records in virtualized list

    I can easily get a count of total records in a non-virtualized list.

    However, all I have tried in a virtualized list gives me the count of the page size, not the total number of records in the list.

    I see that there is a Defined Control:
    List-Record count

    That puts something like this in the UX:
    Records: <span id="{dialog.componentname}.MYLIST1.RECORDCOUNT"></span>
    That is not doing me any good.
    Thoughts?
    Thanks,
    Jay
    Jay Talbott
    Lexington, KY


  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Count of total records in virtualized list

    Adding the Defined Control List-Record count gives me the total count of records in the List... not the count of records in the current virtualized page.

    What do you want to do with the total record count... and where do you want it. Do you need it in Javascript code? XBasic code? You say "That is not doing me any good"... but you don't say if the List-Record count is wrong... or you just can't use it the way you want to. There are other ways at getting the List total record count... but a bit more info will help pinpoint a solution.

  3. #3
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,436

    Default Re: Count of total records in virtualized list

    David,
    I may have mis-spoken (mis-spooked?).
    I was working with a list based on a stored procedure. When I went back to a list with a SQL table, the defined list count control worked fine. My hope is to show the (total) count of records that falls within the current filtering. If there is no filtering applied to the list, I hope to show the total count of records. I think what I will have to do is get the count of records returned by the stored procedure for the initial count of the records in the list, and then from there it seems the defined list count control works.
    Thanks for your quick response.
    Jay
    Jay Talbott
    Lexington, KY


  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,541

    Default Re: Count of total records in virtualized list

    The List-Record control doesn't work with a List based on a SP? If that's the case I'll have a look.

    When you say "count of records that falls within the current filtering" does that mean SP filtering? Client-side filtering? Server-side filtering?

    Could you detail what doesn't work?

  5. #5
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,436

    Default Re: Count of total records in virtualized list

    David,
    I would like to put this topic into abeyance until I figure out what all is working and what is not working. I'll post a video later, when I fully understand what is and isn't working.
    Thanks for your help.
    Jay
    Jay Talbott
    Lexington, KY


  6. #6
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,592

    Default Re: Count of total records in virtualized list

    Quote Originally Posted by Jay Talbott View Post
    David,
    I may have mis-spoken (mis-spooked?).
    I was working with a list based on a stored procedure. When I went back to a list with a SQL table, the defined list count control worked fine. My hope is to show the (total) count of records that falls within the current filtering. If there is no filtering applied to the list, I hope to show the total count of records. I think what I will have to do is get the count of records returned by the stored procedure for the initial count of the records in the list, and then from there it seems the defined list count control works.
    Thanks for your quick response.
    Jay
    If my CRS disease hasn't advanced too far, I seem to remember when list control first came out I noted to Selwyn that the count was not available from an SP. He pointed out why, which of course made plenty of sense. I don't remember the details or have more to tell you, but worth mentioning I think.
    -Steve


  7. #7
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,436

    Default Re: Count of total records in virtualized list

    Thanks, Steve. I'll look into this further.
    Sorry to hear about your CRS disease. I know that CR stands for Can't Remember, but I am not sure what the S stands for. <grin>
    Jay
    Jay Talbott
    Lexington, KY


  8. #8
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,746

    Default Re: Count of total records in virtualized list

    I get the count using this code ...

    Code:
    var lObj = {dialog.object}.getControl('list3');
    var count = lObj._rData.length;
    $('REC_COUNT').innerHTML = count;
    In one of my apps I have a list control that is set to a static data source. An xbasic function is used to get SQL data, via a stored procedure, and populates the list. The above code is ran after the list populates. My list uses dynamic virtualization.

    Hope that helps.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

Similar Threads

  1. virtualized list navigate
    By Tbrondolo in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 03-18-2018, 10:33 AM
  2. Need TOTAL row count in child list, filtered or not
    By Peter.Greulich in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 09-24-2015, 04:00 PM
  3. How do you get Total Records count in an Xbasic function?
    By kingcarol in forum Application Server Version 11 - Web/Browser Applications
    Replies: 26
    Last Post: 01-29-2013, 01:13 PM
  4. {Total Records} not showing the correct count
    By lemandras in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 08-09-2011, 06:31 PM
  5. Count/total number of records for userid
    By EricN in forum Application Server Version 8
    Replies: 8
    Last Post: 01-21-2008, 01:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •