Re: Busted at the Border

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 20706
interpreted = N
texte = Your [HideIf] looks a little screwy to me...you're not comparing anything. Also, the way you have it set up it will either append _and_ give an error, or it will do niether. Try something like this instead:[HideIf [lookup db=catalog.txt&value=[sku]&lookinfield=SKU&returnfield=SKU]=[sku]] [Append db=catalog.txt]....[/Append] [/HideIf][ShowIf [lookup db=catalog.txt&value=[sku]&lookinfield=SKU&returnfield=SKU]=[sku]] [sku] already exists! [/ShowIf] -Dave At 9:32 AM 10/28/98, The Mooseman wrote: >Hi Everyone, > >I have been fussing with trying to check for duplicate skus and >not allowing the append to occur if the sku exists. > >This is what I got working but it still writes to the db but tells me it >found the dup. > >Any direction Por Favor? > > >[hideif >[lookupdb=catalog.txt&value=[SKU]&lookinfield=SKU&returnfield=SKU&Found=[sku]]] >[sku] already exists! >[Append >db=catalog.txt][FormVariables][name]=[URL][value][/URL]&[/FormVariables][/Appen >d >] >[/hideif] > > >Mooseman o--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--------------- 802.253.8612 --+ o--- dave@digitalfrontier.com --+ Associated Messages, from the most recent to the oldest:

    
  1. Re: Busted at the Border (John Hill 1998)
  2. Re: Busted at the Border (Dave MacLeay 1998)
  3. Re: Busted at the Border (Christer Olsson 1998)
  4. Busted at the Border (The Mooseman 1998)
Your [hideif] looks a little screwy to me...you're not comparing anything. Also, the way you have it set up it will either append _and_ give an error, or it will do niether. Try something like this instead:[HideIf [lookup db=catalog.txt&value=[sku]&lookinfield=SKU&returnfield=SKU]=[sku]] [Append db=catalog.txt]....[/Append] [/HideIf][ShowIf [lookup db=catalog.txt&value=[sku]&lookinfield=SKU&returnfield=SKU]=[sku]] [sku] already exists! [/ShowIf] -Dave At 9:32 AM 10/28/98, The Mooseman wrote: >Hi Everyone, > >I have been fussing with trying to check for duplicate skus and >not allowing the append to occur if the sku exists. > >This is what I got working but it still writes to the db but tells me it >found the dup. > >Any direction Por Favor? > > >[hideif >[lookupdb=catalog.txt&value=[SKU]&lookinfield=SKU&returnfield=SKU&Found=[sku]]] >[sku] already exists! >[Append >db=catalog.txt][formvariables][name]=[url][value][/URL]&[/FormVariables][/Appen >d >] >[/hideif] > > >Mooseman o--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--------------- 802.253.8612 --+ o--- dave@digitalfrontier.com --+ Dave MacLeay

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Emailer problems solved (1997) # fields limited? (1997) garbage on page (2000) Re:2nd WebCatalog2 Feature Request (1996) WC2/Mac -- Forms not submitting correctly with Mac browsers (1997) problem 'building' field names (2000) Seeking Better Display of results... (1997) WCS Newbie question (1997) Template Cache problem -- new plugin for ya' (2000) [format xs] freeze (1997) founditems (2000) Stopping bad HTML propagation ? (1997) suggestions for a good text editor on windows? (2005) WebCat vs MS SiteServer? (1999) Training Tapes Improved (1998) Alternating BGColors in Table Rows (1998) WebCatalog [FoundItems] Problem - LONG - (1997) Please please help (2001) Running 2 two WebCatalog.acgi's (1996) [date format] w/in sendmail (1997)