$$ViewTemplate Question

This is a follow-up to a previous post:

I’m using a $$ViewTemplate to process selected documents on the web. This solution is described at http://www.codestore.net/store.nsf/unid/EPSD-5GMT3B?OpenDocument

This solution suggests the following:

A.) Adding HTML tags to the columns of the embedded view and checking the view property ‘Treat contents as HTML’.

B.) On the $$ViewTemplate properties, check ‘Render pass through HTML’.

As this solution results in no twisties being displayed in the view on the web, the following two changes were made to display the twisties:

1.) The HTML tags were removed from all columns except Column 1 which contains check boxes to select documents for processing. The formula of Column 1 is as follows: “[” + “<input type="checkbox" name="processdocs" value="” + @Text(@DocumentUniqueID) + “" />” + “]”

2.) On the $$ViewTemplate properties, 'Render pass through HTML’was unchecked.

This provides the intended result (a view with twisties and check boxes on the web) except that Column 1 apparently prevents documents from being categorized properly. For example, if Columns 2 and 3 are categorized and two documents have the same values for these columns, the two documents appear on separate lines rather than grouped together. This is true regardless of whether Column 1 is categorized.

I’d appreciate any suggestions on how the solution described here might be modified to allow documents in the view to be categorized on the web.

Thanks.

Subject: $$ViewTemplate Question

You can move the checkboxes to any column, Shane – there’s nothing magic about the first column, except that it looks pretty neat. Apart from that, though, it may just be a sorting issue; make sure the checkbox column contains only the checkbox field, and that it’s unsorted.

Subject: RE: $$ViewTemplate Question

The CodeStore solution to process selected documents on the web defines the checkbox column in a unique way - it includes a reference to ‘processdocs’ which is a field on the response form that’s appended to the $$ViewTemplate. Apparently the column formula effectively populates the ‘processdocs’ field with the Unique ID’s of selected documents. An agent then locates documents to process by referring to their unique ID’s in the ‘processdocs’ field.

The checkbox column formula that I’m using is the same as the CodeStore solution except that it includes the tag as well as the “[” and “]” brackets as follows:

“[” + “<input type="checkbox" name="processdocs" value="” + @Text(@DocumentUniqueID) + “" />” + “]”

The thing that’s still not apparent though is this - when the checkbox column is the first

column, it prevents documents from being grouped if other columns are categorized as I described unless ‘@Text(@DocumentUniqueID)’ is removed from the formula. However, ‘@Text(@DocumentUniqueID)’ is required in the formula because this is the value added to the ‘processdocs’ field.

It was suggested that ‘the checkbox column contain only the checkbox field,’ but why should it make any difference that the column also includes a text string representing unique document ID’s if the checkbox column is unsorted and not categorized?

Thanks.

Subject: RE: $$ViewTemplate Question

Take it as read that the document unique id portion is part and parcel of the checkbox field. You don’t, however, need the table elements – in fact, they’ll screw up the table display if the view isn’t “Treat as HTML”. We’ve been chasing this thing for what, a month now? It’s about time you made some progress, I’d think. You don’t have an email addy in your profile. I have one in mine. Send me a note, and I’ll send you a sample. (It won’t have the agent, just the view/viewtemplate and some sample docs to illustrate what I’m saying.)