Tim Gildersleeve wrote:
I expect that this is somewhere in the documentation, but I cant seem to find it. I appolagise if I am asking a stupid question. I am creating a list of jobs to be done in our department, and to populate one of the html tables, I need to get a database column from a query based on a lookup table. In other words I am trying to do something similar to: <dtml-in expr="qryJobType(JOB_TYPE_ID='6')"> This works ok and returns the results where the JOB_TYPE_ID=6. However the JOB_TYPE_ID needs to be retrieved from another query. I have tried: <dtml-in expr="qryJobType(JOB_TYPE_ID='<dtml-var Type_ID-->')"> But this doesnt work. I am assuming that the '' around the dtml-var is trying to treat this literally rather than expand it. I imagine that I have to do something to this to escape it from this action but cant seem to find out what.
AFAIK, you can't embed dtml calls inside another dtml call. It would be nice though! Instead, you can store the job type id in a variable and then use the variable as follows: <dtml-call "REQUEST.set('JobTypeID',Type_ID)"> <dtml-in "qryJobType(JOB_TYPE_ID=JobTypeID)"> ... </dtml-in> Obviously, how you get the Type_ID in the first place is up to you but I presume you've already sorted that out. HTH /Matt. -- Matt Goodall | Isotek Electronics Ltd email: mgg@isotek.co.uk | Claro House, Servia Road Tel: +44 113 2343202 | Leeds, LS7 1NL Fax: +44 113 2342918 | England