Re: [WebDNA] [replace] bug in v7.0?

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105913
interpreted = N
texte = [search db=my.db&neSKUdata-findall] [math show=f]num=[numfond]+1[/math] [/search] [text show=t]timestamp=[math]((([math]{[date]}[/math])-1)*86400)+([math]{[time]}[/math])[/math][random][num][/text] Marc On 11/2/2010 4:09 PM, Kenneth Grome wrote: > Hi Chris, > > Thanks for testing. I just identified what I believe is the real > problem. The [random] tag generates repeatable not random series of > digits when used like this: > > [getchars start=1&end=14] > [loop start=1&end=14] > [random] > [/loop] > [/getchars] > > The chance of generating two identical values using this code should > be one in 10 trillion so I was relying on this code to generate unique > 14 character values when I could not use the [cart] tag to generate > unique values ... but in an 80-line db I found that several of my skus > contained repeating values generated by this code. > > :( > > My guess is that my replace context which used max=1 was replacing the > [itemQuantity] value in only one of the matching sku records, then my > search context was displaying the other matching sku record which had > not been changed. This appeared to be a failure of the [replace] > context when viewing the search results, and it wasn't until I looked > at the db manually that I found the repeating sku values. > > Conclusion: > > The [random] tag generates values in the same pattern when used one > after the other as in my code above, so don't use several [random] > tags in a row if you need a unique value. > > Question: > > What do the rest of you use to create a bunch of unique sku values in > one WebDNA template? > > Sincerely, > Kenneth Grome > > > >> Hi Ken! we were unable to reproduce usin a test database: >> >> [replace >> db=items.db&eqrefdatarq=[value]&max=1]column1=222222222[/replace] >> >> is working as expected, with and without&max=1 >> >> Maybe are you using commerce tags somewhere else? v7.0 has commerce >> tags disabled. >> >> - chris >> >> On Nov 2, 2010, at 18:06, Kenneth Grome wrote: >>> Why doesn't this replace context work in v7.0 but it works in >>> v6.2? I split it up on separate lines to simplify reading it in >>> this email, but of course it all appears on one line in my >>> template: >>> >>> [replace db=db.items.db >>> &eqskudatarq=[url][sku][/url] >>> &max=1] >>> itemQuantity=[url][itemQuantity][/url] >>> [/replace] >>> >>> v7.0 successfully appended the designated record to this db, but >>> it fails to replace the itemQuantity value -- yet the same >>> replace context works fine on v6.2. >>> >>> Bug??? >>> >>> Sincerely, >>> Kenneth Grome >>> >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list. >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >> >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list. >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list. > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > . > -- ------------------------------------------- Marc Thompson Software Engineer Media Solutions University Information Technology University of Utah 801.585.9264 marc.thompson@utah.edu ------------------------------------------- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [replace] bug in v7.0? ("Dan Strong" 2010)
  2. Re: [WebDNA] [replace] bug in v7.0? (Stuart Tremain 2010)
  3. Re: [WebDNA] [replace] bug in v7.0? (Govinda 2010)
  4. Re: [WebDNA] [replace] bug in v7.0? (Marc Thompson 2010)
  5. Re: [WebDNA] [replace] bug in v7.0? (Kenneth Grome 2010)
  6. Re: [WebDNA] [replace] bug in v7.0? (christophe.billiottet@webdna.us 2010)
  7. Re: [WebDNA] [replace] bug in v7.0? (Govinda 2010)
  8. [WebDNA] [replace] bug in v7.0? (Kenneth Grome 2010)
[search db=my.db&neSKUdata-findall] [math show=f]num=[numfond]+1[/math] [/search] [text show=t]timestamp=[math]((([math]{[date]}[/math])-1)*86400)+([math]{[time]}[/math])[/math][random][num][/text] Marc On 11/2/2010 4:09 PM, Kenneth Grome wrote: > Hi Chris, > > Thanks for testing. I just identified what I believe is the real > problem. The [random] tag generates repeatable not random series of > digits when used like this: > > [getchars start=1&end=14] > [loop start=1&end=14] > [random] > [/loop] > [/getchars] > > The chance of generating two identical values using this code should > be one in 10 trillion so I was relying on this code to generate unique > 14 character values when I could not use the [cart] tag to generate > unique values ... but in an 80-line db I found that several of my skus > contained repeating values generated by this code. > > :( > > My guess is that my replace context which used max=1 was replacing the > [itemQuantity] value in only one of the matching sku records, then my > search context was displaying the other matching sku record which had > not been changed. This appeared to be a failure of the [replace] > context when viewing the search results, and it wasn't until I looked > at the db manually that I found the repeating sku values. > > Conclusion: > > The [random] tag generates values in the same pattern when used one > after the other as in my code above, so don't use several [random] > tags in a row if you need a unique value. > > Question: > > What do the rest of you use to create a bunch of unique sku values in > one WebDNA template? > > Sincerely, > Kenneth Grome > > > >> Hi Ken! we were unable to reproduce usin a test database: >> >> [replace >> db=items.db&eqrefdatarq=[value]&max=1]column1=222222222[/replace] >> >> is working as expected, with and without&max=1 >> >> Maybe are you using commerce tags somewhere else? v7.0 has commerce >> tags disabled. >> >> - chris >> >> On Nov 2, 2010, at 18:06, Kenneth Grome wrote: >>> Why doesn't this replace context work in v7.0 but it works in >>> v6.2? I split it up on separate lines to simplify reading it in >>> this email, but of course it all appears on one line in my >>> template: >>> >>> [replace db=db.items.db >>> &eqskudatarq=[url][sku][/url] >>> &max=1] >>> itemQuantity=[url][itemQuantity][/url] >>> [/replace] >>> >>> v7.0 successfully appended the designated record to this db, but >>> it fails to replace the itemQuantity value -- yet the same >>> replace context works fine on v6.2. >>> >>> Bug??? >>> >>> Sincerely, >>> Kenneth Grome >>> >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list. >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >> >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list. >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list. > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > . > -- ------------------------------------------- Marc Thompson Software Engineer Media Solutions University Information Technology University of Utah 801.585.9264 marc.thompson@utah.edu ------------------------------------------- Marc Thompson

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:

2.1 pricing? (1998) WebCatalog can't find database (1997) Database cannot be opened (2005) Formating found categories (1997) suffix mapping for NT? (1997) How far do [showif]s go? (1997) FEA REQ: One .hdr, multiple .db's (2003) Browser Problem?!? NN 4.0+ and Browser Info.txt? (1997) [WebDNA] OT: Indexing PDF on iTools / apache2 (2008) Conditional searching & displaying (1997) GuestBook example (1997) OSX Applescripts -- Anyone? please? (2004) RE: WebCatalog NT beta 18 now available (1997) [OT] SQL and Crackers (2000) Post arguments problem mac? (1997) [replaceChars] would be nice ... (1997) Searching for all records (1998) Netscape v. IE (1997) Help formatting search results w/ table (1997) Resetting a Formvariable (2000)