NetTalk Central

Author Topic: Getting GUID of the only 1 item in browse - without selecting it  (Read 893 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 274
    • View Profile
    • Email
Getting GUID of the only 1 item in browse - without selecting it
« on: September 01, 2023, 02:17:04 AM »
Hi All,
I have a Browse which displays automobiles.  I have a child browse which displays information about that automobile - it is related to automobile by the Automobile_GUID.
I have a system variable (LoggedAuto_GUID) which is used to store the selected Automobile GUID.
I can load the LoggedAuto_GUID when one is SELECTED if there are MULTIPLE listings. If there is only ONE auto, the user does not need to select it because the child  shows.  They can update the child from the child browse.  I need the Automobile_GUID.

Question:

If there is only 1 entry in the Browse for Automobiles, where can I capture the Automobile_GUID for that one record and stuff it into  my system variable (LoggedAuto_GUID)?

So,
1. I would have to test to make sure only one entry.
2. If so, then store the system variable (LoggedAuto_GUID) from the loaded record.
Where is the correct embed point to do the test and load the system variable (LoggedAuto_GUID) if there is only one auto?

TIA,
Ron Jolda

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Getting GUID of the only 1 item in browse - without selecting it
« Reply #1 on: September 01, 2023, 05:25:48 AM »
Hi Ron,

Where you do it will depend on the "path" the user takes to the child browse.

My suggestion would be to check it when the Child Browse is generated, and set the LoggedAuto_Guid there if it's not set already.

Cheers
Bruce

rjolda

  • Sr. Member
  • ****
  • Posts: 274
    • View Profile
    • Email
Re: Getting GUID of the only 1 item in browse - without selecting it
« Reply #2 on: September 01, 2023, 06:39:25 AM »
Thanks Bruce,
I was going down the sequence of events and was going to look for exactly that point in the program - where the child is created based on a table relationship.
Thanks,
Ron