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 theuniqueIDs, then on submitting the first page, all the records are replaceden masse on the second page.On the first page:Return your list as below with the approved field being a checkbox. Savethe 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 ahidden 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]][replacedb=../namedb.db&equniqueIDdata=[interpret][uniqueID[index]][/interpret]]approved=[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%>>
>
Name
>
Phone
>
Created
>
Approved
>
UniqueID
>
>>[FoundItems]>
>>>>>>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:
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 theuniqueIDs, then on submitting the first page, all the records are replaceden masse on the second page.On the first page:Return your list as below with the approved field being a checkbox. Savethe 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 ahidden 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]][replacedb=../namedb.db&equniqueIDdata=[interpret][uniqueID[index]][/interpret]]approved=[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 ==========================>>
>>>>>>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
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...