Browse Lookup Message (Scott Walker)
Richard Kreiss
rkreiss at gccconsulting.net
Thu Mar 17 09:51:55 PDT 2016
Using -s to turn off the "no Records Found" message may be convenient but do a single lookup for a matching record and using the not lookup allows the programmer to put up a custom message rather than leaving the user staring at a blank screen.
Example: check to see if a resident has any pets listed in the database.
There is another trick that can be used with a lookup prior to executing the browse, you can count the records available for the browse and then dynamically size the browse window to fit. In the case below, the brw= could be smaller as residents can only have 2 pets.
No, this is not a filePro browse option. I did demonstrate this option at a filePro conference in Tampa some years ago. Anyone interested in getting a copy of this code should contact me off list. I also have John Esak's scrolling left & right browse code and his browse which will show additional information below the browse window for the highlighted record. Think show on the browse line, Name, address, city & state and the extra window shows the phone #'s.
I do have John's permission to distribute this code.
Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
Lv=street&address
Lookup pets - vaw_pets k=lv i=A -nl
NOT pets
GOTO add_petslok_pet◄ If:
Then: SHOW popup("18","-1") "\r A \r-Add New Pet, \r D \r-Delete Pet, \r, \r U \r-U[date, \b4 X \a--Exit"
395 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: lookup pets = vaw_pets k=lv i=A -npxm b="(brw=12 xkey=audx show=pkeep pop=1 fill=asc,top)[\b5 Type BREED
396 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: Color Name \a-]*4 *5 *6 *10"
397 ------- - - - - - - - - - - - - - - - -
◄ If: @bk = "x"or @sk = "BRKY"
Then: GOTO end_itp
398 ------- - - - - - - - - - - - - - - - -
◄ If: @bk = "d"
Then: rn=pets(@rn);GOTO del_pet
399 ------- - - - - - - - - - - - - - - - -
◄ If: @bk = "a"
Then: rn=pets(@rn);flag="2";GOTO add_pet
400 ------- - - - - - - - - - - - - - - - -
◄ If: @bk = "u"
Then: rn=pets(@rn);GOTO up_pet
401 ------- - - - - - - - - - - - - - - - -
end_itp◄ If:
Then: CLEARS;CLEARB;END
Then: '*
411 ------- - - - - - - - - - - - - - - - -
◄ If: flag = "2"
Then: GOSUB count_p
412 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: lookup pets = vaw_pets r=free -n
413 ------- - - - - - - - - - - - - - - - -
◄ If: NOT pets
Then: ERRORBOX "Pet File Not found";GOTO lok_pet
414 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: pets(1)=address;pets(2)=street;pets(3)=pq
> -----Original Message-----
> From: Filepro-list [mailto:filepro-list-
> bounces+rkreiss=verizon.net at lists.celestial.com] On Behalf Of Jason Garner via
> Filepro-list
> Sent: Thursday, March 17, 2016 9:25 AM
> To: filepro-list at lists.celestial.com
> Subject: Re: Browse Lookup Message (Scott Walker)
>
> Good Morning Scott,
>
> I am new to FP programming but in Linux FP you can use a "-S" argument that
> will get rid of that message and the user will just stare at a blank lookup.
>
> I am not sure if this is the same for Windows FP.
>
> I hope this helps.
>
> - Jason
>
> On Thu, Mar 17, 2016 at 4:39 AM <filepro-list-request at lists.celestial.com>
> wrote:
>
> > Send Filepro-list mailing list submissions to
> > filepro-list at lists.celestial.com
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> > or, via email, send a message with subject or body 'help' to
> > filepro-list-request at lists.celestial.com
> >
> > You can reach the person managing the list at
> > filepro-list-owner at lists.celestial.com
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Filepro-list digest..."
> >
> >
> > Today's Topics:
> >
> > 1. Browse Lookup Message (Scott Walker)
> > 2. Re: Browse Lookup Message (Joe Chasan)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Tue, 15 Mar 2016 16:25:35 -0400
> > From: "Scott Walker" <scott.walker at ramsystemscorp.com>
> > To: <filepro-list at lists.celestial.com>
> > Subject: Browse Lookup Message
> > Message-ID: <00f901d17ef8$d588da40$809a8ec0$@ramsystemscorp.com>
> > Content-Type: text/plain; charset="us-ascii"
> >
> > When you do a browse lookup and it does not find anything, fp
> > automatically
> > displays:
> >
> > "No Records Exist For This Browse Lookup Format"
> >
> > I want to turn off that automatic message since it means nothing to
> > the end user.
> >
> > Is there a way to turn off that message?
> >
> > Regards,
> > Scott
> >
> >
> > Scott Walker (Scott)
> > RAM Systems Corp
> > (704) 896-6549
> > scott.walker at ramsystemscorp.com
> >
> >
> >
> >
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Wed, 16 Mar 2016 15:30:50 -0400
> > From: Joe Chasan <joe at magnatechonline.com>
> > To: filepro-list at lists.celestial.com
> > Subject: Re: Browse Lookup Message
> > Message-ID: <20160316193050.GA11292 at magnatechonline.com>
> > Content-Type: text/plain; charset=us-ascii
> >
> > On Tue, Mar 15, 2016 at 04:25:35PM -0400, Scott Walker via
> > Filepro-list
> > wrote:
> > > When you do a browse lookup and it does not find anything, fp
> > automatically
> > > displays:
> > >
> > > "No Records Exist For This Browse Lookup Format"
> > >
> > > I want to turn off that automatic message since it means nothing to
> > > the
> > end
> > > user.
> > >
> > > Is there a way to turn off that message?
> > >
> > > Regards,
> > > Scott
> >
> > If you are doing this in a process table, in the places where that
> > bothers people I just do a regular, non-browse lookup in processing
> > first before the browse lookup, and if it fails, I branch to
> > appropriate section or "end"
> > instead of displaying the box and "No Records Exists..." message.
> >
> > I realize this is a lot of work if you are trying to override built-in
> > <F6> browses that are not in processing, but putting it in processing
> > has other advantages too.
> >
> > Of course if you want to pony up a few grand, I'm sure it could be a
> > new PF-variable in 5.8.4 by friday...
> >
> > --
> > -Joe Chasan- Magnatech Business Systems, Inc.
> > joe - at - magnatechonline -dot- com Plainview, NY - USA
> > http://www.MagnatechOnline.com Tel.(516) 931-
> 4444/Fax.(516)
> > 931-1264
> >
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> >
> > ------------------------------
> >
> > End of Filepro-list Digest, Vol 146, Issue 12
> > *********************************************
> >
> --
> Jason Garner
> Systems Administrator
> 1801 Oberlin Rd, Suite 204
> Middletown, PA 17057
> Work 717-985-1122 x 1139
> Mobile 717-645-3521
> jason.garner at evalsvs.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20160317/4b418eb6/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list