[Montagne, Michael]
zAllProjRoles is a zsqlmethod that returns as one of it's fields Projteamid. I can get a value if I use <dtml-var Projteamid> within the loop. ProjTeamPhones takes an argument called Projteamid. It should return all the phone numbers for this id number. But this code gives me a 'Bad Request Error' on 'Projteamid'. How can I pass the correct value? <snip> <dtml-in zAllProjRoles> <table bgcolor="<dtml-var color2>" width=800 cellspacing=0 cellpadding=5 border=0> ,,<snip>.. <dtml-var ContempContactName> </td> <td align="left"> <dtml-in ProjTeamPhones> <dtml-var PhoneNumber><br> </dtml-in> </td> </tr>
</dtml-in>
This will probably work (I haven't tried it but at least it will be close): ... <dtml-in ProjTeamPhones> <dtml-var "PhoneNumber(Projteamid=&dtml-sequence-item;)"><br> </dtml-in> or <dtml-in ProjTeamPhones> <dtml-var "PhoneNumber(Projteamid=_['sequence-item'])"><br> </dtml-in> This may also work, if only one parameter has been defined for the method: <dtml-in ProjTeamPhones> <dtml-var "PhoneNumber(&dtml-sequence-item;)"><br> </dtml-in> You need to pass the parameter to the method (if it were in the REQUEST could it get automatically picked up, otherwise pass the parameter). sequence-item gives you the current value at that point in the loop. Tom P