Re: problem 'building' field names
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34555
interpreted = N
texte = Charles,Between your post and a colleague in the office, this is what worked for this case:--- fixed code ---[text show=t]period1=[LOOKUP db=/dbs/period.db&value=1&lookInField=period_id&returnField=periodValue¬Found=error][/text][text show=t]period2=[LOOKUP db=/dbs/period.db&value=2&lookInField=period_id&returnField=periodValue¬Found=error][/text]
[search db=/dbs/pollnames.db&gePoll_IDData=1&Poll_IDsmm=t&Poll_IDsort=1&poll_idsdir=as]numfound=[numfound]
[founditems][text show=f]poll1=[raw][[/raw][pollname]_[period1][raw]][/raw][/text][text show=f]poll2=[raw][[/raw][pollname]_[period2][raw]][/raw][/text][append db=/dbs/votes.db]poll_id=[poll_id]&vote_id=[cart]-[index]&value1=[interpret][poll1][/interpret]&value2=[interpret][poll2][/interpret]&start_date=[start]&end=[math][expire][/math]&vote_date=[math][date][/math]&ip=[ipaddress]&business=[business][/append][/founditems][/search]--- end fixed code ---Basically I needed an additional step between setting the variable and interpreting it for storage into the database.On Wednesday, July 12, 2000, Charles Kline wrote:>I do something similar (I think) like this:>>[search >db=/databases/databasetouse.db&eqlisttypedatarq=sell&eqdealeriddatarq=[__dealerid]]>[founditems]>[replace >db=/databases/mwlisting_off.db&eqlistingiddata=[listingid]&append=t][listfields >db=/databases/mwlisting.db][fieldname]=[url][interpret][[fieldname]][/interpret][/url]&[/listfields][/replace]>[/founditems]>[/search]>>Notice the use of the [interpret][/interpret] and the extra set>of []>>Hope that helps.>>Charles>>>Hello,>>>>On my form results page I am trying to build the fields names to >>append to my database. I do this as I am trying to append a single >>record for each of 7 different sets of information from my form page.>>>>The form vaiables display fine on the results page, however when I >>try to dynamically 'build' the fieldnames (to make the system >>automatic), I get he text of the form field names in the database >>instead of the value or the form variables.>>>>In the code below, I have the append commented out while I try to >>figure this out.>>If I enter the actual form field name e.g. [usd/jpy_Q3] then I >>properly get the value for this orm variable. However, when building >>the same name, I only get the text in the database, e.g. usd/jpy_Q3 >>instead of the value of this field.>>>>>>Here is the code.>>>>[text show=t]period1=[LOOKUP >>db=/dbs/period.db&value=1&lookInField=period_id&returnField=periodValue¬Found=error][/text]>>[text show=t]period2=[LOOKUP >>db=/dbs/period.db&value=2&lookInField=period_id&returnField=periodValue¬Found=error][/text]>>>>[search >>db=/dbs/pollnames.db&gePoll_IDData=1&Poll_IDsmm=t&Poll_IDsort=1&poll_idsdir=as]>>numfound=[numfound]
>>[founditems]>>>>-- these lines for testing / debugging only>>[poll_id] - [pollname]
>>[pollname]_[period1]
>>[pollname]_[period2]
>>--- end of debugging>>>>[!][append >>db=/dbs/votes.db]poll_id=[poll_id]&vote_id=[cart]-[index]&value1=[Interpret][pollname]_[period1][/Interpret]&value2=[pollname]_[period2]&start_date=[start]&end=[math][expire][/math]&vote_date=[math][date][/math]&ip=[ipaddress]&business=[business]>>[/append][/!]>>>>[/founditems]>>[/search]>>>>>>------------------------------------------------------------->>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/>>>------------------------------------------------------------->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/>-------------------------------------------------------------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:
Charles,Between your post and a colleague in the office, this is what worked for this case:--- fixed code ---[text show=t]period1=[LOOKUP db=/dbs/period.db&value=1&lookInField=period_id&returnField=periodValue¬Found=error][/text][text show=t]period2=[LOOKUP db=/dbs/period.db&value=2&lookInField=period_id&returnField=periodValue¬Found=error][/text][search db=/dbs/pollnames.db&gePoll_IDData=1&Poll_IDsmm=t&Poll_IDsort=1&poll_idsdir=as]numfound=[numfound]
[founditems][text show=f]poll1=[raw][[/raw][pollname]_[period1][raw]][/raw][/text][text show=f]poll2=[raw][[/raw][pollname]_[period2][raw]][/raw][/text][append db=/dbs/votes.db]poll_id=[poll_id]&vote_id=[cart]-[index]&value1=[interpret][poll1][/interpret]&value2=[interpret][poll2][/interpret]&start_date=[start]&end=[math][expire][/math]&vote_date=[math][date][/math]&ip=[ipaddress]&business=[business][/append][/founditems][/search]--- end fixed code ---Basically I needed an additional step between setting the variable and interpreting it for storage into the database.On Wednesday, July 12, 2000, Charles Kline wrote:>I do something similar (I think) like this:>>[search >db=/databases/databasetouse.db&eqlisttypedatarq=sell&eqdealeriddatarq=[__dealerid]]>[founditems]>[replace >db=/databases/mwlisting_off.db&eqlistingiddata=[listingid]&append=t][listfields >db=/databases/mwlisting.db][fieldname]=[url][interpret][[fieldname]][/interpret][/url]&[/listfields][/replace]>[/founditems]>[/search]>>Notice the use of the [interpret][/interpret] and the extra set>of []>>Hope that helps.>>Charles>>>Hello,>>>>On my form results page I am trying to build the fields names to >>append to my database. I do this as I am trying to append a single >>record for each of 7 different sets of information from my form page.>>>>The form vaiables display fine on the results page, however when I >>try to dynamically 'build' the fieldnames (to make the system >>automatic), I get he text of the form field names in the database >>instead of the value or the form variables.>>>>In the code below, I have the append commented out while I try to >>figure this out.>>If I enter the actual form field name e.g. [usd/jpy_Q3] then I >>properly get the value for this orm variable. However, when building >>the same name, I only get the text in the database, e.g. usd/jpy_Q3 >>instead of the value of this field.>>>>>>Here is the code.>>>>[text show=t]period1=[LOOKUP >>db=/dbs/period.db&value=1&lookInField=period_id&returnField=periodValue¬Found=error][/text]>>[text show=t]period2=[LOOKUP >>db=/dbs/period.db&value=2&lookInField=period_id&returnField=periodValue¬Found=error][/text]>>>>[search >>db=/dbs/pollnames.db&gePoll_IDData=1&Poll_IDsmm=t&Poll_IDsort=1&poll_idsdir=as]>>numfound=[numfound]
>>[founditems]>>>>-- these lines for testing / debugging only>>[poll_id] - [pollname]
>>[pollname]_[period1]
>>[pollname]_[period2]
>>--- end of debugging>>>>[!][append >>db=/dbs/votes.db]poll_id=[poll_id]&vote_id=[cart]-[index]&value1=[interpret][pollname]_[period1][/Interpret]&value2=[pollname]_[period2]&start_date=[start]&end=[math][expire][/math]&vote_date=[math][date][/math]&ip=[ipaddress]&business=[business]>>[/append][/!]>>>>[/founditems]>>[/search]>>>>>>------------------------------------------------------------->>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/>>>------------------------------------------------------------->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/>-------------------------------------------------------------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/
Dale
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:
Can't use old cart file (was One more try) (1997)
[WebDNA] How much does it cost now? (2008)
Encrypt/Decrypt (2007)
Multiple prices (1997)
If Empty ? (1997)
flash-wc (2000)
Simple way to create unique SKU (1997)
Problems with [Applescript] (1997)
NewCart+Search with one click ? (1997)
Large databases in WebCat (1997)
Here we go again... (2006)
Comments in db? (1997)
[WebDNA] WebDNA Start-up Error (2012)
ErrorLog.txt bug (1998)
Hello??? (1997)
RE: WebCatalog NT beta 18 now available (1997)
emailer (1997)
Online reference (1997)
What am I missing (1997)
[WebDNA] User sessions - cookies only or cookies and a (2016)