Normal Topic Repetitive Unique Search/Updates (Read 1917 times)
JFisher
Junior Member
**
Offline


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
Repetitive Unique Search/Updates
Aug 25th, 2004 at 8:22pm
Print Post Print Post  
My client, a school bus company has a 9300 record student "Riderlist" database complete with student name, address, parent, school, etc, (provided by the school administration).  It is a simple, one screen layout.  There is a unique student ID number field and element for each student in the database.

The company uses the student ID number as a search argument to find each student's "page," and then assigns the bus number for that student, and files the record to call up another student record by ID number, and assign bus number, etc.

This is quite rapid in Q&A, since they use a search, then F10, then F7 to create the next search.
In Sesame, when in a search, a "Result set" of one is returned.  To search for the next student, it seems necessary to exit search and begin a new search.

Is there a way I have not discovered to file a student record, and immediately open a new search, with a new unique record called by a new student number?

I was able to point to the "Student ID" element with throwfocus (or even goto) but the problem is the search result set of one, saving, and then re-opening a new search routine for another uniquely numbered result set.

I hope there is an easier way to perform this rapid, record, by record, search and update.

...or am I missing something I should have seen in the book?

Thanks,
Jack
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Repetitive Unique Search/Updates
Reply #1 - Aug 25th, 2004 at 8:29pm
Print Post Print Post  
From a retrieved record, pressing F7 returns you to the retrieve spec, just like it does in Q&A. They can retrieve the record, make the change, press F10 to save, then press F7 to return to the Retrieve Spec to do the new search.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
JFisher
Junior Member
**
Offline


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
Re: Repetitive Unique Search/Updates
Reply #2 - Aug 25th, 2004 at 8:47pm
Print Post Print Post  
Now, why didn't I try that??  (Must have been another "Senior moment")

Erica, thanks a bunch!!  I am always amazed at the speed with which you provide help. 

(I am still waiting from an answer from MicroSoft on a question I submitted several days ago.)

Jack
  
Back to top
 
IP Logged
 
JFisher
Junior Member
**
Offline


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
Re: Repetitive Unique Search/Updates
Reply #3 - Aug 27th, 2004 at 9:58pm
Print Post Print Post  
After pressing F10, a new Blank record comes up.  To prevent this, I found the routine published in Inside Sesame for February, Page 11 ("Prevent Blank/Junk Records") does the job for me.  Then pressing F10 saves the record, and returns to it.  then pressing F7 will bring up the new search form. This avoids getting a MSG window asking if I want to  exit a blank record.

If @update and @isblank(LastName) then
{
@Msg("Returning you to previous record.")
ResultSetCurrentPosition(@ResultSetCurrentPosition() - 1)
}

So, thanks to the Lanticans, and Tom for helping us get beyond this simple update problem.
Jack
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Repetitive Unique Search/Updates
Reply #4 - Aug 28th, 2004 at 1:28am
Print Post Print Post  
You're welcome. 

The upcoming version also has a new way to do this using NotifyForm, which can prevent a Form from advancing past the last existing record.  It's less severe than forcing the Result Set position.

BTW, if you need to do this, get in the habit of checking @IsNew instead of testing for a blank value. If someone goes back later and blanks out the value you're checking, they will never be able to get back to that record again!

Just as a side note,  you should be careful when preventing forms from advancing to the blank record. It is usually okay on a top level form, but since it is the only way you can add a subrecord, you can prevent adding any records if you apply this technique to a subform.

In general, a slightly different programming style than you used in Q&A and good use of state programming can usually make it unnecessary to prevent advancing to the new record, making the whole thing a non-issue.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
JFisher
Junior Member
**
Offline


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
Re: Repetitive Unique Search/Updates
Reply #5 - Aug 29th, 2004 at 10:56pm
Print Post Print Post  
Erica,
Thanks for the wisdom.  I will use @isnew.

In this case the form is a simple one with no subforms.  Thanks for the caution.  ...and I will look forward to using NotifyForm also.  It sounds like a better way.

BTW, do you work 7 days a week?  Your assistance is second to none!!
Wink   Jack
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Repetitive Unique Search/Updates
Reply #6 - Aug 30th, 2004 at 2:28am
Print Post Print Post  
Quote:
BTW, do you work 7 days a week?  Your assistance is second to none!!
Wink   Jack


It has been my experience that Erika, Mark, Ray and probably many of the other Lantica team members (the behind the scenes people) not only work 7 days a week they work 24 hours a day. It is amazing to me the level of support and care they offer to us users. I can only hope that the Shareholders of Lantica realize the value they bring to Sesame and appreciate them as much as we do.

  I hope we get to meet some more of the Lantica team at the conference (Ray without his reaper mask for one),  It would be a pleasure to buy him and the others a drink.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Repetitive Unique Search/Updates
Reply #7 - Aug 30th, 2004 at 11:17am
Print Post Print Post  
Quote:
BTW, do you work 7 days a week?  Your assistance is second to none!!


Everybody works pretty hard around here. Mark and I do work almost every day, in part because we like to. Sesame is a wonderful project with a super group of users, and we like to be able to provide you with new tools and toys every few months.

We're all working hard right now to get the Conference ready, and to get the new version tested and documented. The Conference presentations will highlight some of the new features. We think you'll be especially pleased with the enhancements to what Reports can do, the new Print functions and the new set of SBasic functions and features that we added for you Developer types.   Grin  8)  Grin
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Repetitive Unique Search/Updates
Reply #8 - Aug 30th, 2004 at 4:14pm
Print Post Print Post  
To quote John Kerry,
who was quoting George Bush,
who probalby never saw the movie.....

"BRING IT ON!"
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged