You can check the method's parameter type with <@VARINFO
NAME="method$[PARAMETERNAME]" ATTRIBUTE="type"> inside your method
so 
-if the parameter is type text (your current id)
do exactly the same process 
-if parameter is type array (one column with multiple id)
make a for loop to call the same method (recursive call).

Here is a small tcf exemple (only the method) wich won't run alone but
it will allow you to see the method I've used to convert my old method
to accept list of id.

Hope this help :)

Gauthier 

-----Message d'origine-----
De: "David Shelley" <[EMAIL PROTECTED]>
A: Multiple recipients of list witango-talk <[EMAIL PROTECTED]>
Date: 14/11/02
Objet: RE: Witango-Talk:  object loop question

Craig,

I would recommend writing the method to accept an array of IDs as input,
then loop through those and generate your reports. If you put the loop
in
your taf file you incur the extra overhead of calling the method 50
times.
It's a normal for loop you need, not an object loop.

Dave Shelley
[EMAIL PROTECTED]
Visit tango.ca for expert developer assistance, custom business
applications
or application audits.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:owner-witango-talk@;witango.com]On Behalf Of Craig Lutz
Sent: Thursday, November 14, 2002 9:46 AM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: object loop question


I have a TCF that takes one parameter - an ID - and then
does a bunch of dbms stuff and then returns an HTML report
based on that ID.

I have only had to prepare the report for one ID at a time
so this was never an issue,  but now I need to do the same
thing for say an array of 50 IDs.

So, my questions is, what is the most appropriate way of
doing this? Should I just set up a normal FOR LOOP and
execute the TCF for each row in the array and let the HTML
accumulate.

Or is this what an OBJECT LOOP is for? I've never used that
action before and am not sure I completely get what it is
asking for.

Any advice would be greatly appreciated.

Thanks,

Craig


__________________________________________________
Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo ! 
Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w

Attachment: recursivemethodcall.zip
Description: Zip compressed data

Reply via email to