Re: Suggestion: appendfounditems

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 40551
interpreted = N
texte = Thank you. Of course this works, but that is exactly what I am trying NOT to do. Therefore my suggestion for a new appendfounditems tag.In the meantime your code works well:-)Sincerely, NitaiOn 11.6.2002 7:13 PM, marc malacarme wrote:> I use this which works very well,(webstar, mac, 0S 9.1) all you need to do > is replace the db_is=value with your dbs name, and unique_field=SKU field > name with your unique field name, and your search context. Once you remove > the comments it isn't so long. If you use the old [date %Y%m%d][time %H%M%S] > to generate you original skus you should be able to leave the > new_unique_field_value below alone. Although it will make your new sku > longer in length than [date %Y%m%d][time %H%M%S]. It duplicates 1000 records > in a db with 5000 records & 10 fields in 6 seconds. > > [text]db_is=books_li.db[/text] > [text]unique_field=SKU[/text] > [text]dup_search=neSKUdata=findall[/text] > > > [text]db_fields=[ListFields [db_is]][hideif > [fieldname]=[unique_field]][FieldName]=[[FieldName]]&[/hideif][/ListFields][ > /text] > [search db=[db_is]&[dup_search]][numfound] > [founditems] > [!]-----------------------// you need to find a new unique_field value for > the append. depending on your db unique_field I use > [math][sku]+[index][/math] because my field is numeric and called > sku----------[/!] > [text]new_unique_field_value=[interpret][[unique_field]][/interpret][index][ > /text] > > [!]-----------------------// copies all the fields except sku back into the > db from the found set----------[/!] > [append > db=[db_is]][interpret][db_fields][/interpret][unique_field]=[new_unique_fiel > d_value][/append] > [/founditems] > [/search] > > Good luck > > >> Hi SMSI, >> >> Sometimes we need to copy a record and for this it would be great to have a >> [appendfoundrecords] tag, sort of like the [replacefounditems]. >> >> With the current settings, to be able to copy a record, we need to: >> >> [search] >> [founditems] >> >> [append]fieldname1=[xxxx]&fieldname2=xxxx&etc...[/append] >> >> [/founditems] >> [/search] >> >> With the new tag we could: >> >> [search] >> >> [appendfounditems]sku=[newsku][/appendfounditems] >> >> [/search] >> >> Thus we would NOT need to add all the fieldnames in a append tag, because >> [appendfounditems] would just do that for us. The current method is a pain >> in the rear when one has over 20 or more fields. >> >> Thank you for consider this suggestion. >> >> Sincerely, >> Nitai > > > ------------------------------------------------------------- > 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/-- Tools to energize business Content Management & eBusiness SystemsComputerOil GmbH http://computeroil.com/ Hauptstrasse 12 info@computeroil.com 8252 Schlatt/Switzerland Tel: +41 (0)52 654 15 55 ------------------------------------------------------------- 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: Suggestion: appendfounditems (ComputerOil Nitai 2002)
  2. Re: Suggestion: appendfounditems (ComputerOil Nitai 2002)
  3. Re: Suggestion: appendfounditems (Donovan 2002)
  4. Re: Suggestion: appendfounditems (Donovan 2002)
  5. Re: Suggestion: appendfounditems (Will Starck 2002)
  6. Re: Suggestion: appendfounditems (marc malacarme 2002)
  7. Re: Suggestion: appendfounditems (Donovan 2002)
  8. Re: Suggestion: appendfounditems (ComputerOil Nitai 2002)
  9. Re: Suggestion: appendfounditems (Donovan 2002)
  10. Suggestion: appendfounditems (ComputerOil Nitai 2002)
Thank you. Of course this works, but that is exactly what I am trying NOT to do. Therefore my suggestion for a new appendfounditems tag.In the meantime your code works well:-)Sincerely, NitaiOn 11.6.2002 7:13 PM, marc malacarme wrote:> I use this which works very well,(webstar, mac, 0S 9.1) all you need to do > is replace the db_is=value with your dbs name, and unique_field=SKU field > name with your unique field name, and your search context. Once you remove > the comments it isn't so long. If you use the old [date %Y%m%d][time %H%M%S] > to generate you original skus you should be able to leave the > new_unique_field_value below alone. Although it will make your new sku > longer in length than [date %Y%m%d][time %H%M%S]. It duplicates 1000 records > in a db with 5000 records & 10 fields in 6 seconds. > > [text]db_is=books_li.db[/text] > [text]unique_field=SKU[/text] > [text]dup_search=neSKUdata=findall[/text] > > > [text]db_fields=[ListFields [db_is]][hideif > [fieldname]=[unique_field]][FieldName]=[[FieldName]]&[/hideif][/ListFields][ > /text] > [search db=[db_is]&[dup_search]][numfound] > [founditems] > [!]-----------------------// you need to find a new unique_field value for > the append. depending on your db unique_field I use > [math][sku]+[index][/math] because my field is numeric and called > sku----------[/!] > [text]new_unique_field_value=[interpret][[unique_field]][/interpret][index][ > /text] > > [!]-----------------------// copies all the fields except sku back into the > db from the found set----------[/!] > [append > db=[db_is]][interpret][db_fields][/interpret][unique_field]=[new_unique_fiel > d_value][/append] > [/founditems] > [/search] > > Good luck > > >> Hi SMSI, >> >> Sometimes we need to copy a record and for this it would be great to have a >> [appendfoundrecords] tag, sort of like the [replacefounditems]. >> >> With the current settings, to be able to copy a record, we need to: >> >> [search] >> [founditems] >> >> [append]fieldname1=[xxxx]&fieldname2=xxxx&etc...[/append] >> >> [/founditems] >> [/search] >> >> With the new tag we could: >> >> [search] >> >> [appendfounditems]sku=[newsku][/appendfounditems] >> >> [/search] >> >> Thus we would NOT need to add all the fieldnames in a append tag, because >> [appendfounditems] would just do that for us. The current method is a pain >> in the rear when one has over 20 or more fields. >> >> Thank you for consider this suggestion. >> >> Sincerely, >> Nitai > > > ------------------------------------------------------------- > 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/-- Tools to energize business Content Management & eBusiness SystemsComputerOil GmbH http://computeroil.com/ Hauptstrasse 12 info@computeroil.com 8252 Schlatt/Switzerland Tel: +41 (0)52 654 15 55 ------------------------------------------------------------- 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/ ComputerOil Nitai

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:

Search multiple fields (1997) NT error logs (1997) Draft Manual, Tutorial, and more (1997) orders being printed (1998) CommandSecurity? (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Re:Random Command (1997) [bug] Technical Support Log Crashes Server (2004) [WebDNA] "commerce tags" versus "shopping" tags? (specifically what is the Partner Edition?) (2009) [isfile] ? (1997) formatting a number (1999) [delete .. &max=] (2004) WebCatalog 4.0 has been released! (2000) help on brickwalls (2003) Multiple shipping databases (1997) Protecting Realms (was: IIS Brain Dead) (1998) RE: [WebDNA] anyone successfully using webdna with paypal's NVP API? (2008) Potential Conflicts? (1997) zip code vs tax rate database request (2002) Max Record length restated as maybe bug (1997)