Re: Loop code problem

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30068
interpreted = N
texte = Let me see if this is what you want :)On your form page:[search ......] [founditems] [/founditems] [/search]this will create an array of text variables equal to the number of records found by the search. On your form process page...[loop start=1&end=[arraysize] [REPLACE db=example.db&eqRECORDNUMdatarq=[interpret][RECORDNUM-[index]][/interpret]]FIELD==[interpret][FIELD-[index]][/interpret][/REPLACE] [/loop]Hope this works for you.regardsanup----- Original Message ----- From: Ralph Dratman To: WebCatalog Talk Sent: Wednesday, April 05, 2000 2:46 PM Subject: Loop code problem > Thanks to all who replied to my previous message. But I believe I misstated the problem. I should have said, > > The fields __CNAME1, __PCT1, __CNAME2, ___PCT2, ... up through __CNAME10 and __PCT10, have been set up via a form on the same page. > > I am trying to implement an array of text variables. I have been able to confirm that these variables are already created and initialized. Now I want to access the contents of these array variables for use in a REPLACE. > > My idea was to construct, for example, the string __CNAME3 by writing > > __CNAME[LOOPNUM] > > where LOOPNUM happens to be, say, 3. This seems to work. > > Then I proceed to put the above into an enclosing set of square brackets, as follows > > [__CNAME[LOOPNUM]] > > which I think should be equivalent to > > [__CNAME3] > > hoping thereby to retrieve the contents of the variable called > > __CNAME3 > > This works sometimes but not always! My method assumes that the results of a substitution are then rescanned for more possible substitutions. Is this true? > > Now that I've stated the problem better, > > 1. What is the RIGHT way (if any) to construct and use an array of text variables? > 2. If I've got the right general idea, what am I doing wrong? > > I apologize for not stating the problem more clearly in my first post. > > Thank you. > > Ralph Dratman > > ------------------------------------------------------------- > 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 ------------------------------------------------------------- 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 Associated Messages, from the most recent to the oldest:

    
  1. Re: Loop code problem (Anup setty 2000)
  2. Re: Loop code problem (WebDNA Support 2000)
  3. Loop code problem (Ralph Dratman 2000)
  4. Re: Loop code problem (Kenneth Grome 2000)
  5. Re: Loop code problem (Kenneth Grome 2000)
  6. Re: Loop code problem (Anup setty 2000)
  7. Re: Loop code problem (Jason Sofonia 2000)
  8. Re: Loop code problem (Anup setty 2000)
  9. Re: Loop code problem (Nicolas Verhaeghe 2000)
  10. Re: Loop code problem (Nicolas Verhaeghe 2000)
  11. Re: Loop code problem (Anup setty 2000)
  12. Loop code problem (Ralph Dratman 2000)
Let me see if this is what you want :)On your form page:[search ......] [founditems] [/founditems] [/search]this will create an array of text variables equal to the number of records found by the search. On your form process page...[loop start=1&end=[arraysize] [REPLACE db=example.db&eqRECORDNUMdatarq=[interpret][RECORDNUM-[index]][/interpret]]FIELD==[interpret][FIELD-[index]][/interpret][/REPLACE] [/loop]Hope this works for you.regardsanup----- Original Message ----- From: Ralph Dratman To: WebCatalog Talk Sent: Wednesday, April 05, 2000 2:46 PM Subject: Loop code problem > Thanks to all who replied to my previous message. But I believe I misstated the problem. I should have said, > > The fields __CNAME1, __PCT1, __CNAME2, ___PCT2, ... up through __CNAME10 and __PCT10, have been set up via a form on the same page. > > I am trying to implement an array of text variables. I have been able to confirm that these variables are already created and initialized. Now I want to access the contents of these array variables for use in a REPLACE. > > My idea was to construct, for example, the string __CNAME3 by writing > > __CNAME[LOOPNUM] > > where LOOPNUM happens to be, say, 3. This seems to work. > > Then I proceed to put the above into an enclosing set of square brackets, as follows > > [__CNAME[LOOPNUM]] > > which I think should be equivalent to > > [__CNAME3] > > hoping thereby to retrieve the contents of the variable called > > __CNAME3 > > This works sometimes but not always! My method assumes that the results of a substitution are then rescanned for more possible substitutions. Is this true? > > Now that I've stated the problem better, > > 1. What is the RIGHT way (if any) to construct and use an array of text variables? > 2. If I've got the right general idea, what am I doing wrong? > > I apologize for not stating the problem more clearly in my first post. > > Thank you. > > Ralph Dratman > > ------------------------------------------------------------- > 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 ------------------------------------------------------------- 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 Anup setty

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:

State DB & TIme Zones (2003) [WebDNA] Linux Fedora (2008) WC2.0 Memory Requirements (1997) Displaying photo attached to first record (1997) autosensing lanague selection (1997) PCS Frames (1997) Problems with [Applescript] (1997) Logical and or in [hideif] (1997) Bug or syntax error on my part? (1997) suffix mapping for NT? (1997) Trouble Searching (1999) WebCat2 - [format thousands] (1997) Num Sort Descending (2004) Server problem? (1998) Price Not Appearing (2000) Sorting... stumped. (2006) Free WebDNA snippets (Extending WebCatalog) (1997) WebCat2: multiple currency support (1997) P1: How to make webcatalog more stable. - LONG (1999) mac hack (1997)