Re: Help ! Frustrating Problem

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23252
interpreted = N
texte = WebCatalog doesn't have a way of knowing which updated form fields to apply to which records when you combine everything in one big form. If you want to do that you should use an embedded [replace] and loop through the changes you want to occur.
> > > >
> >
> > >
on test2.tpl:[showif [action]=replace] [loop start=1&end=[number]] [replace db=test2.db&eqINFOdatarq=[interpret][[index]_SEARCH][/interpret]]info=[interpret][[index]_INFO][/interpret][/replace] [/loop] [/showif]I haven't tested this so there may be a minor error in here, but the concept is good.John. >Hello everyone, > >I thought that this was going to be an easy (no brainer) and it is >turning out to be really frustrating. > >I have a form that I will use to update a database. I fill in the form >automatically with the current data by doing a search. Then, The user can >change the data shown in the fields if it needs to be and then submit the >form. This should then update the database using a replace. I thought I >understood the process really well...but I an not get it to work. I am >using version 3.0.4b5 > >I have tried many different ways of coding this from hard coding to doing >the search. It works ok if I hard code the replace and only do it for one >field like this: > >
> > > > > >
> > >
> > >If I add another field like this it breaks it: > >
> > > > > >
> >
> > >
> > >So what I really want to do is this, but it does not work either: > >
> > [Math show=F]Total=0[/Math] > [Search db=Holdings.db&neCompNamedata=[blank]&rank=off] > [FoundItems] > [Math show=F]Total=([Total]+[PrcntHolding])[/Math] > [ShowIf [Math][index]%2[/Math]=1] > > > > > [/ShowIf] > [ShowIf [Math][index]%2[/Math]=0] > > > > > [/ShowIf] > [/FoundItems] > [/Search] >
value=[CompName]>size=35>value=[PrcntHolding]>value=[PrcntHolding] size=4>%
value=[CompName]>size=35>value=[PrcntHolding]>value=[PrcntHolding] size=4>%
> > > > > [Commitdatabase Holdings.db] >
> > >Some one please help =) I will send .db files if it helps. > >Thanks > >Charles > >-- >_______________________________________________________________ >Charles Kline ckline@macsultants.com > WebMaster - eCommerce Specialist > >MacSultants >Professional Solutions for Computer Systems > >Phone# 609-273-3255 >Fax# 609-273-3721 John A. Hill Pacific Coast Software eCommerce / Web Developer Tools http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: Help ! Frustrating Problem (John Hill 1999)
  2. Help ! Frustrating Problem (charles kline 1999)
WebCatalog doesn't have a way of knowing which updated form fields to apply to which records when you combine everything in one big form. If you want to do that you should use an embedded [replace] and loop through the changes you want to occur.
> > > >
> >
> > >
on test2.tpl:[showif [action]=replace] [loop start=1&end=[number]] [replace db=test2.db&eqINFOdatarq=[interpret][[index]_SEARCH][/interpret]]info=[interpret][[index]_INFO][/interpret][/replace] [/loop] [/showif]I haven't tested this so there may be a minor error in here, but the concept is good.John. >Hello everyone, > >I thought that this was going to be an easy (no brainer) and it is >turning out to be really frustrating. > >I have a form that I will use to update a database. I fill in the form >automatically with the current data by doing a search. Then, The user can >change the data shown in the fields if it needs to be and then submit the >form. This should then update the database using a replace. I thought I >understood the process really well...but I an not get it to work. I am >using version 3.0.4b5 > >I have tried many different ways of coding this from hard coding to doing >the search. It works ok if I hard code the replace and only do it for one >field like this: > >
> > > > > >
> > >
> > >If I add another field like this it breaks it: > >
> > > > > >
> >
> > >
> > >So what I really want to do is this, but it does not work either: > >
> > [Math show=F]Total=0[/Math] > [Search db=Holdings.db&neCompNamedata=[blank]&rank=off] > [founditems] > [Math show=F]Total=([Total]+[PrcntHolding])[/Math] > [ShowIf [math][index]%2[/Math]=1] > > > > > [/ShowIf] > [ShowIf [math][index]%2[/Math]=0] > > > > > [/ShowIf] > [/FoundItems] > [/Search] >
value=[CompName]>size=35>value=[PrcntHolding]>value=[PrcntHolding] size=4>%
value=[CompName]>size=35>value=[PrcntHolding]>value=[PrcntHolding] size=4>%
> > > > > [Commitdatabase Holdings.db] >
> > >Some one please help =) I will send .db files if it helps. > >Thanks > >Charles > >-- >_______________________________________________________________ >Charles Kline ckline@macsultants.com > WebMaster - eCommerce Specialist > >MacSultants >Professional Solutions for Computer Systems > >Phone# 609-273-3255 >Fax# 609-273-3721 John A. Hill Pacific Coast Software eCommerce / Web Developer Tools http://www.smithmicro.com John Hill

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:

[WebDNA] Sendmail on a one page website..... (2013) Sort of a Dilema! (1998) return two fields w/ [lookup] (1998) shownext not showing next...still r2 (1997) finding the next thursday (2000) shipcost (1997) HTML mapped to WebCat (2001) A workaround for handling date range search in yyyy/mm/dd form (1997) How flexible is Shipping? (1997) ShowNext (1997) Can [writefile] files be served thru webcat? (2000) Apache processes (2003) Help formatting search results w/ table (1997) problems with 2 tags (1997) test (2000) Upgrading old WebCat Database Files (1997) RE: Append problem w/" (1999) Semi OT: vbulletin and # viewing - how do that do that? (2003) Search minus first found (1999) Demo math questions (2000)