Re: multiple record replace

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39936
interpreted = N
texte = I have done this very thing. The [index] tag is your friend here.The way I approached it was to use the [index] tag within the [founditems] loop to save all the values of the checkboxes and the values of the uniqueIDs, then on submitting the first page, all the records are replaced en masse on the second page.On the first page:Return your list as below with the approved field being a checkbox. Save the uniqueID's as a hidden variable and number of records found - [numfound] (so you know how many records to loop thru on next page)- as a hidden variable. It will look something like this: [search........] [founditems] [name] [phone] [createdate] [uniqueID] [/founditems] [/search] The person can use this listing to check or uncheck the checkboxes.On the second page after submitting the form:[loop start=1&end=[loopnum]] [replace db=../namedb.db&equniqueIDdata=[interpret][uniqueID[index]][/interpret]]appr oved=[showif [interpret][approved[index]][/interpret]=T]YES[/showif][/replace] [/loop]HTHSallyAt 05:36 PM 11/6/01 -0600, you wrote: >Here's my scenario: > >A search in a database is done. >the results page shows > >name phone createdate approved uniqueID > >I'm wanting to be able to Approve or Unapprove on this page, with the >results being written back into the database records >The approve/unapprove items change daily. > >I've tried this with checkboxes and with a yes/no select form element. >Both ways I get weird results, sometimes the approve part gets written >back as wanted, other times not, most times not. > >If I go to the individual item and change Approved all behaves as needed. >Its just in this mass change scenario it fails. > >I saw a post where I think this was sorta answered, but i got lost following >the code . . . >. >code from the search result page ========================== > >width=100%> > > > > > > > > >[FoundItems] > > > > > > > > > > > > > > > >[/FoundItems] >
NamePhoneCreatedApprovedUniqueID
>[Name] > >[Phone1] > >[createdate] > > > >[uniqueID] >
> > > > > >replace context code follows on the submit approved changes page >========================== > > > >[replace >db=../listings.db&equniqueIDdata=[uniqueID]]&approved=[approved][/replace] > >Thanks again. > >-------------------------------------------------------- >Is it me or do all the daily talklist messages only show up in an attached >email archive form??? >I liked them beter when I received many emails individually. > > > > > > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: multiple record replace (Brian Fries 2001)
  2. Re: multiple record replace (Lester Emo 2001)
  3. Re: multiple record replace (Brian Fries 2001)
  4. Re: multiple record replace (Donovan Brooke 2001)
  5. Re: multiple record replace (Donovan Brooke 2001)
  6. Re: multiple record replace (Donovan Brooke 2001)
  7. Re: multiple record replace (Donovan Brooke 2001)
  8. Re: multiple record replace (Stephen Russo 2001)
  9. Re: multiple record replace (Sally Reidy 2001)
  10. Re: multiple record replace (Christer Olsson 2001)
  11. Re: multiple record replace (Glenn Busbin 2001)
  12. Re: multiple record replace (Ron Parker 2001)
  13. Re: multiple record replace (Brian Boegershausen 2001)
  14. multiple record replace (Rich Kwasniewski 2001)
I have done this very thing. The [index] tag is your friend here.The way I approached it was to use the [index] tag within the [founditems] loop to save all the values of the checkboxes and the values of the uniqueIDs, then on submitting the first page, all the records are replaced en masse on the second page.On the first page:Return your list as below with the approved field being a checkbox. Save the uniqueID's as a hidden variable and number of records found - [numfound] (so you know how many records to loop thru on next page)- as a hidden variable. It will look something like this: [search........] [founditems] [name] [phone] [createdate] [uniqueID] [/founditems] [/search] The person can use this listing to check or uncheck the checkboxes.On the second page after submitting the form:[loop start=1&end=[loopnum]] [replace db=../namedb.db&equniqueIDdata=[interpret][uniqueID[index]][/interpret]]appr oved=[showif [interpret][approved[index]][/interpret]=T]YES[/showif][/replace] [/loop]HTHSallyAt 05:36 PM 11/6/01 -0600, you wrote: >Here's my scenario: > >A search in a database is done. >the results page shows > >name phone createdate approved uniqueID > >I'm wanting to be able to Approve or Unapprove on this page, with the >results being written back into the database records >The approve/unapprove items change daily. > >I've tried this with checkboxes and with a yes/no select form element. >Both ways I get weird results, sometimes the approve part gets written >back as wanted, other times not, most times not. > >If I go to the individual item and change Approved all behaves as needed. >Its just in this mass change scenario it fails. > >I saw a post where I think this was sorta answered, but i got lost following >the code . . . >. >code from the search result page ========================== > >width=100%> > > > > > > > > >[founditems] > > > > > > > > > > > > > > > >[/FoundItems] >
NamePhoneCreatedApprovedUniqueID
>[Name] > >[Phone1] > >[createdate] > > > >[uniqueID] >
> > > > > >replace context code follows on the submit approved changes page >========================== > > > >[replace >db=../listings.db&equniqueIDdata=[uniqueID]]&approved=[approved][/replace] > >Thanks again. > >-------------------------------------------------------- >Is it me or do all the daily talklist messages only show up in an attached >email archive form??? >I liked them beter when I received many emails individually. > > > > > > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >Web Archive of this list is at: http://search.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Sally Reidy

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:

Cart sweeper (2000) (no subject) (1997) Multiple Ad databases? (1997) More Applescript (1997) update problem (1998) Never Mind - Was - Credit Card Processing (2000) WebCat2b13MacPlugIn - more [date] problems (1997) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) OT: Please set your computer's clock (1997) WebCat b13 CGI -shownext- (1997) PSC recommends what date format yr 2000??? (1997) XX shipping days til christmas (2002) WebCat b13 CGI -shownext- (1997) Authenticate (1999) UNC path support in WebDNA 5.0 (2003) [delete] problem (1997) LOOP and IF statements (1997) Blocking off access (2005) WebCat2 beta 11 - new prefs ... (1997) Wanted: More Math Functions (or, Can You Solve This?) (1997)