Alpha Video Training
Results 1 to 9 of 9

Thread: Count Records

  1. #1
    Member
    Real Name
    Phil Krenzer
    Join Date
    May 2012
    Posts
    18

    Default Count Records

    Is their a way to count records of a populated field only and not the blanks that are in the same field. Tried using the count function along with the isblank and isnotblank but can't seem to get it to work.

  2. #2
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,387

    Default Re: Count Records

    Hi Phil,
    This is one of those times that it's helpful to post the code that isn't working as expected.

    Gregg

  3. #3
    Member
    Real Name
    Phil Krenzer
    Join Date
    May 2012
    Posts
    18

    Default Re: Count Records

    Hi Gregg,

    2 of the fields in the app are a proposal number field and an invoice number field. The invoice number field contains some blank records as not all of the proposals are accepted. The code I am using for the invoice field is --- if(isnotblank("Invnbr"),count(acpt->invnbr,grp->Estmtr,grp->Detail),0). Am getting 0 count for invoice field.

    Phil

  4. #4
    Member
    Real Name
    Phil Krenzer
    Join Date
    May 2012
    Posts
    18

    Default Re: Count Records

    Gregg disregard my last will get back to you later have to leave for a bit

  5. #5
    "Certified" Alphaholic Ronald Anusiewicz's Avatar
    Real Name
    Ronald Anusiewicz
    Join Date
    Oct 2000
    Location
    Southampton, MA
    Posts
    1,581

    Default Re: Count Records

    Is this something you want to do?
    Attached Files Attached Files
    Alpha Anywhere v3.5
    Version 12.3, Build 2999
    MySql56 & DBF's

    Alpha 4, 5, Anywhere

    Ron Anusiewicz

  6. #6
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Count Records

    Phil,
    from the helps... in discussion of Count()...

    This function is a report writer function, not intended for table level field rules or other expressions. While the function may perform in some areas outside of the report writer, its use there is not supported

  7. #7
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Count Records

    Phil,

    I've extended Ron's good example.

    -- tom
    Attached Files Attached Files

  8. #8
    Member
    Real Name
    Phil Krenzer
    Join Date
    May 2012
    Posts
    18

    Default Re: Count Records

    Tom and Ron
    Thanks for your input. I'm working on it will let you know outcome. Thanks again.
    Phil

  9. #9
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,686

    Default Re: Count Records

    If you add a session variable and place it on the form you can omit the button and use the OnFetch event to update the non-blank count

    dim shared nrecs as N
    nrecs = a5_get_records_in_query("authors", "nationality <> /"/" ")
    vnrecs.refresh()

    (replace the forward slash with a backslash or use singe quotes)
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

Similar Threads

  1. Trying to get count of records = .f.
    By djldc in forum Alpha Five Version 8
    Replies: 2
    Last Post: 08-17-2007, 01:14 PM
  2. Count records
    By Amateur in forum Alpha Five Version 5
    Replies: 11
    Last Post: 09-12-2004, 08:44 PM
  3. count records
    By crimmelcp in forum Alpha Five Version 4
    Replies: 7
    Last Post: 04-18-2001, 03:11 AM
  4. count of records on each page
    By infomatic in forum Alpha Five Version 4
    Replies: 3
    Last Post: 07-04-2000, 11:33 AM
  5. Count of records.
    By Rodney Efird in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-17-2000, 07:34 AM

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
  •