I have an "invoice" template (with a bunch of TVs) and a "product" template (with 2 TVs).
I am now just trying to set up the invoice items part of the invoice template. I have created an "InvoiceProducts" TV that enables selection of one or more product docs and outputs them as a comma delimited list of doc IDs. What I want to do is generate the invoice items summary within the invoice by feeding the output of of the InvoiceProducts TV into a ditto call (along with a suitable invoice items template).
In other words, I want to pass a list of doc IDs to ditto in such a way that it only summarises docs in that list.
Can anyone please help clarify the ditto call to do this?
Thanks,
Anton
In Ditto 1.1b2 or later you can do &documents=`[*InvProducts*]`
OK, I spoke too soon. My original attempt above does not restrict ditto to the doc IDs supplied by [*InvProducts*]. Instead, it just displays all docs under the given start IDs.
Mark: Re your suggestion: &documents=`[*InvProducts*]`
I tried this but got a SQL error. The same thing happens when I manually enter a few comma delimited doc IDs into the "&documents=``" parameter as a test. I notice that there are no IDs being passed to the IN clause of the SQL query. I.e., it reads something like this: "WHERE sc.id IN ()".
Any ideas?
Thanks,
Anton