Re: tabs as delimiters

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59578
interpreted = N
texte = You cannot store tabs in a db field because the fields themselves are delimited by tabs. Of course this means you cannot use the tab character as a delimiter in your listwords context either. Try using the delimiter character that webdna changes the tab into when it writes your makeaddress value to the db, then maybe your listwords context will work properly. But first, check the db to see what's actually being stored in the rnk field. My guess is that only the first value (rnk_1) is being stored in the db anyways, because putting tabs in the replace context is bad syntax to begin with so webdna will probably only replace the part before the first tab. Or just use another delimiter instead of trying to use tabs. Sincerely, Kenneth Grome www.kengrome.com >Thanks Brian. Here's the code: > = a real, typed tab > >[!]knit together address [/!] **Note [rnk_1] is blank in this example >[text]makeaddress=[rnk_1][rnk_2][rnk_3][rnk_4][rnk_5][/text] > >[!]stick it in the db [/!] >[replace db=[db]&eqcatdatarq=settings]rnk=[makeaddress][/replace] > >[!]pull it apart later [/!] >[search db=[db]&eqcatdatarq=settings][founditems] >[listwords >delimiters=&tabs=T&words=[rnk]][text]rnk_[index]=[word][/text][/listwords] >[text]eventvenue=[rnk_1][/text] >[text]eventaddress=[rnk_2][/text] >[text]eventcity=[rnk_3][/text] >[text]eventstate=[rnk_4][/text] >[text]eventzip=[rnk_5][/text] >[/founditems][/search] > > >[eventvenue]
>[eventaddress]
>[eventcity], [eventstate] [eventzip] > >...which resolves to >123 MainAnycityNJ08055 (boxes where the tabs would be) <<--this >should be blank >123 Main >Anycity, NJ 08055 > > >Everything was fine with the pipe character until I tested it with >the first field empty, in case the venue was just an address, no >restaurant name or anything. That's when I discovered that empty >words in a listwords were just tossed away, and everything moved up >a notch.. Now, with the tabs, the first slot gets filled with the >whole string. I just can't see what's going on here. I'd rather not >have to require an entry in every field. >Terry > >Brian wrote: >Tabs work fine - just type them in - but you could be running into >mismanaged URL contexts or something. Can you show an example of code >that doesn't work? >- Brian >On Oct 8, 2004, at 11:40 AM, Terry Wilson wrote: >> When you use a tab as a delimiter in a string so you can split it >> apart later via listwords, with blank entries intact: >> >> Is there a trick to putting the tab character into your code? Do you >> just use the tab key on the keyboard, or what? I can't seem to get it >> to work. >> >> Thanks, >> Terry > >------------------------------------------------------------- >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://webdna.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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: tabs as delimiters NOT ( Rob Marquardt 2004)
  2. Re: tabs as delimiters NOT ( Terry Wilson 2004)
  3. Re: tabs as delimiters ( John Peacock 2004)
  4. Re: tabs as delimiters ( Terry Wilson 2004)
  5. Re: tabs as delimiters ( "WebDna @ Inkblot Media" 2004)
  6. Re: tabs as delimiters ( Terry Wilson 2004)
  7. Re: tabs as delimiters ( Brian Fries 2004)
  8. Re: tabs as delimiters ( Terry Wilson 2004)
  9. Re: tabs as delimiters ( Kenneth Grome 2004)
  10. Re: tabs as delimiters ( Terry Wilson 2004)
  11. Re: tabs as delimiters ( Kenneth Grome 2004)
  12. Re: tabs as delimiters ( Terry Wilson 2004)
  13. Re: tabs as delimiters ( Brian Fries 2004)
  14. tabs as delimiters ( Terry Wilson 2004)
You cannot store tabs in a db field because the fields themselves are delimited by tabs. Of course this means you cannot use the tab character as a delimiter in your listwords context either. Try using the delimiter character that webdna changes the tab into when it writes your makeaddress value to the db, then maybe your listwords context will work properly. But first, check the db to see what's actually being stored in the rnk field. My guess is that only the first value (rnk_1) is being stored in the db anyways, because putting tabs in the replace context is bad syntax to begin with so webdna will probably only replace the part before the first tab. Or just use another delimiter instead of trying to use tabs. Sincerely, Kenneth Grome www.kengrome.com >Thanks Brian. Here's the code: > = a real, typed tab > >[!]knit together address [/!] **Note [rnk_1] is blank in this example >[text]makeaddress=[rnk_1][rnk_2][rnk_3][rnk_4][rnk_5][/text] > >[!]stick it in the db [/!] >[replace db=[db]&eqcatdatarq=settings]rnk=[makeaddress][/replace] > >[!]pull it apart later [/!] >[search db=[db]&eqcatdatarq=settings][founditems] >[listwords >delimiters=&tabs=T&words=[rnk]][text]rnk_[index]=[word][/text][/listwords] >[text]eventvenue=[rnk_1][/text] >[text]eventaddress=[rnk_2][/text] >[text]eventcity=[rnk_3][/text] >[text]eventstate=[rnk_4][/text] >[text]eventzip=[rnk_5][/text] >[/founditems][/search] > > >[eventvenue]
>[eventaddress]
>[eventcity], [eventstate] [eventzip] > >...which resolves to >123 MainAnycityNJ08055 (boxes where the tabs would be) <<--this >should be blank >123 Main >Anycity, NJ 08055 > > >Everything was fine with the pipe character until I tested it with >the first field empty, in case the venue was just an address, no >restaurant name or anything. That's when I discovered that empty >words in a listwords were just tossed away, and everything moved up >a notch.. Now, with the tabs, the first slot gets filled with the >whole string. I just can't see what's going on here. I'd rather not >have to require an entry in every field. >Terry > >Brian wrote: >Tabs work fine - just type them in - but you could be running into >mismanaged URL contexts or something. Can you show an example of code >that doesn't work? >- Brian >On Oct 8, 2004, at 11:40 AM, Terry Wilson wrote: >> When you use a tab as a delimiter in a string so you can split it >> apart later via listwords, with blank entries intact: >> >> Is there a trick to putting the tab character into your code? Do you >> just use the tab key on the keyboard, or what? I can't seem to get it >> to work. >> >> Thanks, >> Terry > >------------------------------------------------------------- >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://webdna.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://webdna.smithmicro.com/ Kenneth Grome

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:

UPS QuickCost and More (2000) Include a big block of text (1997) RE: Adding a product from another site (1997) Summary layout (1997) Add more fields to an existent data base (1997) adding second sku (2000) Re:quit command on NT (1997) auto-stripping of spaces (1997) Emailer (WebCat2) (1997) Color options for items (1999) REPOST: Large founditems loops (2000) process SSI (1998) MacAuthorize hub, no modal password dialog? (1997) Looking for a Manual (1997) error -571 (2004) Re:need help please (1997) tmpl Vs DB (1999) Order not created error (never mind) (1997) using showpage and showcart commands (1996) weird G3 happenings (1998)