Alpha DevCon 2018
Results 1 to 8 of 8

Thread: Embedded Browse - go to Latest Record

  1. #1
    Member
    Real Name
    David Abbott
    Join Date
    Mar 2007
    Location
    Bedfordshire, England
    Posts
    72

    Default Embedded Browse - go to Latest Record

    Members,

    I am an amateur user, and can normally work out a way (mostly trial and error!) on how to solve a problem. I've spend a good deal of time on this, so I thought best to ask if there is a solution that I just can't seem to find.

    I have a set and within this is a one-to-many embedded browse which holds transactions for the particular person. Some records now have many dozens of transactions, and when moving to any particular record, the embedded browse always shows the earliest transaction. It then means scrolling down, as it is the latest ones that I normally want to look at. I've added a couple or screen shots to show what I mean.

    Any suggestions please?
    Attached Images Attached Images

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,833

    Default Re: Embedded Browse - go to Latest Record

    See the AlphaSports invoice form. There's a button on the form (Bottom) with the code

    browse1.fetch_last()
    browse1.activate()
    There can be only one.

  3. #3
    Member
    Real Name
    David Abbott
    Join Date
    Mar 2007
    Location
    Bedfordshire, England
    Posts
    72

    Default Re: Embedded Browse - go to Latest Record

    Thanks, Stan.

    I've added the buttons I need and it works fine - apart from me needing to change the AlphaSports coding to, for example, from browse1.fetch_last() to Control_browse1.fetch_last().

    I was thinking the wrong question, in that I was looking for the active record in the embedded browse to be the latest by default, and effecting this was my difficulty taking account of my limited knowledge/expertise in coding (though A5 has enabled me to do more than I expected over the years). Using a single mouse click is not a hardship at all compared with having to scroll though numerous lines in the browse.
    Last edited by Esio Trot; 12-17-2017 at 07:45 AM. Reason: Typo

  4. #4
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,428

    Default Re: Embedded Browse - go to Latest Record

    David

    Now you can use that code in another event that will cause the repositioning of the record pointer without a click of a button.

    You could try the onfetch event of the form - it works (thanks for the reminder Stan..) ;) ...
    Last edited by Al Buchholz; 12-17-2017 at 03:27 PM.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  5. #5
    Member
    Real Name
    Lonnie D Kelley
    Join Date
    Dec 2005
    Posts
    5

    Default Re: Embedded Browse - go to Latest Record

    You can go into the Filter/Order tab of the Form Properties, select the table which the embedded browse is based on, and select the order that you want to display the records in the browse - maybe INVERT(Trx_date)?

  6. #6
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,428

    Default Re: Embedded Browse - go to Latest Record

    Quote Originally Posted by LDK View Post
    You can go into the Filter/Order tab of the Form Properties, select the table which the embedded browse is based on, and select the order that you want to display the records in the browse - maybe INVERT(Trx_date)?
    Good idea, but that serves a different purpose.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  7. #7
    Member
    Real Name
    Jon P Moody
    Join Date
    Nov 2016
    Posts
    31

    Default Re: Embedded Browse - go to Latest Record

    Or set the order on the child table to the required column and tick/untick descending as needed.

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

    Default Re: Embedded Browse - go to Latest Record

    The display order of the child records seems to be on the Transaction Description column. Which is probably why 'Article 23 Liability' appears first in the list and the date fields are not sorted. Assuming the records are being entered in the Date field order, then record order would give you a proper display. However, if they are being entered randomly, then you might want to set the order for the child records in the form's properties to something like 'cdate(date)+transaction_description'. Which of course is up to you, but the current display seems odd to me. Then fetching the last record in the browse will give you the most recent payment entry by date - which btw, would put 'Article 23 Liability' last in the list.
    Last edited by MoGrace; 12-21-2017 at 11:54 AM.
    Robin

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

Similar Threads

  1. Replies: 4
    Last Post: 02-17-2016, 08:30 AM
  2. Restricting New Record on Embedded Browse
    By Bob Arbuthnot in forum Alpha Five Version 8
    Replies: 31
    Last Post: 06-04-2008, 10:42 AM
  3. Embedded browse problem after latest upgrade
    By gveneman in forum Alpha Five Version 8
    Replies: 9
    Last Post: 06-25-2007, 04:57 AM
  4. populating an embedded browse on a new record
    By Christopher Hickie in forum Alpha Five Version 5
    Replies: 16
    Last Post: 04-29-2004, 08:04 PM
  5. New Record in an embedded browse
    By Mary Nickerson in forum Alpha Five Version 4
    Replies: 5
    Last Post: 01-05-2001, 01:20 PM

Posting Permissions

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