Re: ConverChars
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23817
interpreted = N
texte = >I don't actually want to replace the value in the database itself. I have>simplified the logic to using only one character, so now all I am really>trying to do is something like the following:>>temp1=[ConvertChars db=shapes.db][GetChars>start=1&end=1][style][/GetChars][/ConvertChars]>>I can see temp1 gets the value I expect as it gets displays it on the page.No, actually it's *not* getting the value you think it is, or it would use that value in the link below. It's not getting the value because your code above does not assign temp1 to a value, it simply displays a value on the page, next to a string of text that looks like temp1=.If you really want that value assigned to a variable named temp1, you have to use a [text] context, like this:[text]temp1=[ConvertChars db=shapes.db][GetChars start=1&end=1][style][/GetChars][/ConvertChars][/text]Then when you use the [temp1] tag somewhere further on down the page, it will have an actual value, which means your link will probably work properly, assuming there's an actual record in your db with the sku you're referring to. But if the dynamic SKU you're creating does not appear in the db to begin with, you'll have to make some more changes before this will work:
add to cartSincerely,Ken GromeWebDNA Consultant
Associated Messages, from the most recent to the oldest:
>I don't actually want to replace the value in the database itself. I have>simplified the logic to using only one character, so now all I am really>trying to do is something like the following:>>temp1=[ConvertChars db=shapes.db][GetChars>start=1&end=1][style][/GetChars][/ConvertChars]>>I can see temp1 gets the value I expect as it gets displays it on the page.No, actually it's *not* getting the value you think it is, or it would use that value in the link below. It's not getting the value because your code above does not assign temp1 to a value, it simply displays a value on the page, next to a string of text that looks like temp1=.If you really want that value assigned to a variable named temp1, you have to use a
[text] context, like this:
[text]temp1=[ConvertChars db=shapes.db][GetChars start=1&end=1][style][/GetChars][/ConvertChars][/text]Then when you use the [temp1] tag somewhere further on down the page, it will have an actual value, which means your link will probably work properly, assuming there's an actual record in your db with the sku you're referring to. But if the dynamic SKU you're creating does not appear in the db to begin with, you'll have to make some more changes before this will work:
[cart]&db=catalog.db>add to cartSincerely,Ken GromeWebDNA Consultant
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:
formatting a number (1999)
[date] formatting bug inside [orderfile]? (1998)
Emailer setup (1997)
Online expense management tool (2004)
Problems passing [SKU] with $Replace in 2.0 (1997)
wrong input values? (1997)
Error Messages Returned to User (1997)
Cookie Question (1999)
Reversed words (1997)
Math Function (1997)
Extended [Concvertchars] needed (1997)
[WebDNA] Talk archives (2010)
WebCat2 - Getting to the browser's username/password data (1997)
Include a big block of text (1997)
SIMS setup (1998)
Misc Stuff That Might Help (1997)
help with duplicate records posted (1998)
Safari browser and WebDNA set-cookies (2003)
WebDNA deletes major DB data big time (2004)
Separate SSL Server (1997)