Re: Formvariables name matching
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 63568
interpreted = N
texte = William, you need to treat it as a 'contains'  From the docs: "to exactly match the name of the parameter or match  any name that contains the "name" value."Stuart Tremainidfk web developments, sydney, australiaOn 09 Dec 2005, at 5:42 PM, William DeVaul wrote:> How does formvariables match by name?>> In one case I have formvariables name=1_vendorname and in another I  > have name=_1_vendorname.>> I can't understand why the first one fails but the second works.   > Does the formvariables with an inexact match match in the middle of  > the name rather than at the start?>> --------------Sample code------------> This works as expected:>> [showif submit=[submit]]> [formvariables name=sku_&exact=F]> SKU=[text show=T]keyfieldsku=[value][/text]
> [formvariables name=_[value]_&exact=F]> [grep search=^_[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
> [/formvariables]> 
> [/formvariables]> [/showif]>> Example output for above code:> SKU=1> VENDORNAME:=This is the name of vendor1> VENDORADDRESS:=This is the address of vendor1>> SKU=2> VENDORNAME:=This is the name of vendor2> VENDORADDRESS:=This is the address of vendor2>>>> This does not work as expected (I have changed the form to remove  > the _ at the front of the var name.):>> [showif submit=[submit]]> [formvariables name=sku_&exact=F]> SKU=[text show=T]keyfieldsku=[value][/text]
> [formvariables name=[value]_&exact=F]> [grep search=^[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
> [/formvariables]> 
> [/formvariables]> [/showif]>> Example output:> SKU=1> VENDORNAME:=This is the name of vendor1> VENDORADDRESS:=This is the address of vendor1>> 21_VENDORNAME:=This is the name of vendor21> 21_VENDORADDRESS:=This is the address of vendor21>> 31_VENDORNAME:=This is the name of vendor31> 31_VENDORADDRESS:=This is the address of vendor31>>> -------------------------------------------------------------> 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  digest@talk.smithmicro.com>> 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:
William, you need to treat it as a 'contains'  From the docs: "to exactly match the name of the parameter or match  any name that contains the "name" value."Stuart Tremainidfk web developments, sydney, australiaOn 09 Dec 2005, at 5:42 PM, William DeVaul wrote:> How does formvariables match by name?>> In one case I have formvariables name=1_vendorname and in another I  > have name=_1_vendorname.>> I can't understand why the first one fails but the second works.   > Does the formvariables with an inexact match match in the middle of  > the name rather than at the start?>> --------------Sample code------------> This works as expected:>> [showif submit=[submit]]> [formvariables name=sku_&exact=F]> SKU=[text show=T]keyfieldsku=[value][/text]
> [formvariables name=_[value]_&exact=F]> [grep search=^_[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
> [/formvariables]> 
> [/formvariables]> [/showif]>> Example output for above code:> SKU=1> VENDORNAME:=This is the name of vendor1> VENDORADDRESS:=This is the address of vendor1>> SKU=2> VENDORNAME:=This is the name of vendor2> VENDORADDRESS:=This is the address of vendor2>>>> This does not work as expected (I have changed the form to remove  > the _ at the front of the var name.):>> [showif submit=[submit]]> [formvariables name=sku_&exact=F]> SKU=[text show=T]keyfieldsku=[value][/text]
> [formvariables name=[value]_&exact=F]> [grep search=^[keyfieldsku]_&replace=][NAME]:[/grep]=[value]
> [/formvariables]> 
> [/formvariables]> [/showif]>> Example output:> SKU=1> VENDORNAME:=This is the name of vendor1> VENDORADDRESS:=This is the address of vendor1>> 21_VENDORNAME:=This is the name of vendor21> 21_VENDORADDRESS:=This is the address of vendor21>> 31_VENDORNAME:=This is the name of vendor31> 31_VENDORADDRESS:=This is the address of vendor31>>> -------------------------------------------------------------> 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  digest@talk.smithmicro.com>> 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/
 Stuart Tremain 
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:
 
Three new problems, maybe a fourth (1997)
 
shownext (1997)
 
[WebDNA] Build Name for 6.1 (2008)
 
show all problem (1997)
 
BUG?- .html extention and not working. (2000)
 
WebMerchant 1.6 and SHTML (1997)
 
WebCat2 several catalogs? (1997)
 
Help! WebCat2 bug (1997)
 
suffix mapping for NT? (1997)
 
Mystery authentication (1997)
 
RE: .html to .tpl (1998)
 
Problems getting parameters passed into email. (1997)
 
No data - More Info (1997)
 
lineitems context in sendmail context (1998)
 
my SOS last week... (1996)
 
using listfiles to build a database? (2000)
 
Show shoppingcart after remove last item (1997)
 
WebCatalog can't find database (1997)
 
Problems with [Applescript] (1997)
 
Searching multiple dbs (1998)