Actually I looked at the example again after I sent it and I realized that it wasn't as efficient as I normally would use, so here is another version.
What I tend to do in most of my development work is to use dynamic popups wherever possible. Hopefully with version 5 I'll be able to use application scope but right now I am using user scope. I have a standard tcf for most of my applications which includes a method to build popups and also includes a method to check for the existance of the appropriate user variables. The call to check for the existance of the required user variables for a taf is done at the beginning of the taf. If they exist, no additional search is performed. If they don't exist, the search is done and the variable is populated. This way the search to create a popup is done once per user session, rather than once each time the user calls up the form. If anyone would like to have more information, I'd be happy to provide it. Hope this helps, Steve Smith Skadt Information Solutions Office: (519) 624-4388 GTA: (416) 606-3885 Fax: (519) 624-3353 Cell: (416) 606-3885 Email: [EMAIL PROTECTED] Web: http://www.skadt.com > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Steve Smith > Sent: August 29, 2002 8:12 PM > To: Multiple recipients of list witango-talk > Subject: RE: Witango-Talk: Two Inserts from a Drop Down > > > Here's an example with just one search taking place and the > results of that > search being stored in a user variable that is used to build the popup and > during the insert. I haven't tested it but it should work fine, most of it > was build using standard snippets that I use regularly. > > Hope this helps, > > Steve Smith > > Skadt Information Solutions > Office: (519) 624-4388 > GTA: (416) 606-3885 > Fax: (519) 624-3353 > Cell: (416) 606-3885 > Email: [EMAIL PROTECTED] > Web: http://www.skadt.com > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of Web Dude > > Sent: August 29, 2002 5:19 PM > > To: Multiple recipients of list witango-talk > > Subject: RE: Witango-Talk: Two Inserts from a Drop Down > > > > > > Actually, I am currently doing a price search before the insert. This > > is the search I am trying to eliminate. The price ID is passed to the > > price search to get the correct price for that product and size, > > then inserted. But the price table has already been searched once > > when displaying the price to the user. It would save a step if you > > could just insert the size, price, quantity, etc from the original > > search action. > > > > >The suggestion that I made does not allow the price to be > > inserted from the > > >browser. It is inserted by viewing the product the user has > selected and > > >looking up the price of that product (by means of searching an > > array rather > > >than the database). If I am guessing what Web Dude is attempting > > to do, he > > >needs to write the product's price to the table at time of sale. > > Otherwise > > >if he relies on a join to the product table, if he reviews > > orders at a later > > >date and the price has changed the order data is not accurate. > > > > > >Hope this helps, > > > > > >Steve Smith > > > > > >Skadt Information Solutions > > >Office: (519) 624-4388 > > >GTA: (416) 606-3885 > > >Fax: (519) 624-3353 > > >Cell: (416) 606-3885 > > >Email: [EMAIL PROTECTED] > > >Web: http://www.skadt.com > > > > > > > > >> -----Original Message----- > > >> From: [EMAIL PROTECTED] > > >> [mailto:[EMAIL PROTECTED]]On Behalf Of John McGowan > > >> Sent: August 29, 2002 4:39 PM > > >> To: Multiple recipients of list witango-talk > > >> Subject: Re: Witango-Talk: Two Inserts from a Drop Down > > >> > > >> > > >> Dude, > > >> > > >> If you do it the way you want to do it, (which is totally > > >> possible with the > > >> other posters suggestions) you're opening yourself up to abuse by > > >> malicious > > >> users. > > >> > > >> I assume you're talking about inserting new rows into a shopping > > >> cart table > > >> or something like that. If you rely on getting the price from > > >> the browser, > > >> then it would be very easy for someone to buy a T shirt for 5 > > >> bucks instead > > >> of 13. > > >> > > >> You should make a habit of never relying on the browser to send you > > >> something as important as a price. > > >> > > >> My 2 cents. > > >> > > >> /John > > >> > > >> > > >> ----- Original Message ----- > > >> From: "Web Dude" <[EMAIL PROTECTED]> > > >> To: "Multiple recipients of list witango-talk" > > <[EMAIL PROTECTED]> > > >> Sent: Thursday, August 29, 2002 12:37 PM > > >> Subject: Witango-Talk: Two Inserts from a Drop Down > > >> > > >> > > >> > I've seen this posted before, but can't seem to find it. > > >> > > > >> > I have a table that has size and price info. Example: > > >> > > > >> > ID Size Price > > >> > 1 S 10.00 > > >> > 2 L 11.00 > > >> > 3 XL 12.00 > > >> > 4 XXL 13.00 > > >> > > > >> > I do a db call to load a dropdown. I would like to > display the size > > >> > in the dropdown and insert BOTH the size and the price from the > > >> > dropdown. > > >> > > > >> > I realize I could do a search on the ID before the insert and then > > >> > insert from the results, but is there a slicker way of doing this > > >> > with just an insert? > > >> > > > >> > Thanks! > > >> > -- > > >> > > > ________________________________________________________________________ > > >> > TO UNSUBSCRIBE: send a plain text/US ASCII email to > > [EMAIL PROTECTED] > > >> > with unsubscribe witango-talk in the message body > > >> > > >> > > ________________________________________________________________________ > > >> TO UNSUBSCRIBE: send a plain text/US ASCII email to > > [EMAIL PROTECTED] > > >> with unsubscribe witango-talk in the message body > > >> > > > > > > >________________________________________________________________________ > > >TO UNSUBSCRIBE: send a plain text/US ASCII email to > [EMAIL PROTECTED] > > > with unsubscribe witango-talk in the message body > > > > > > -- > > ________________________________________________________________________ > > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > > with unsubscribe witango-talk in the message body > > >
webdudeexample.taf
Description: Binary data
