$$ViewTemplateDefault and document

is there anyway to get a handle to a document from using the $$ViewTemplateDefault? i have a database that uses this and the documents are just viewed, but now i need to find a way to get a hold of a couple of fields on a document and can’t figure out how. any suggestions would be greatly appreciated.

thanks,

jason

Subject: $$ViewTemplateDefault and document

Why do you need a handle to them? A viewTemplate only formats the view’s output. In the Notes client you can use the UnprocessedDocuments method to get a handle on all the documents currently selected in the view.

On the web it’s trickier. Usually it involves one column of checkboxes and you make an array of all the checkboxes on the form and loop through it to find which ones are selected. Once you do, you get a hold of that document’s UNID hence a “handle” to your document.

Subject: $$ViewTemplateDefault and document

you can check this linkhttp://www.codestore.net/store.nsf/cmnts/7F5FCE22435F8FC280256C8900756130?OpenDocument

great work…jake

Subject: $$ViewTemplateDefault and document

Hi,

What do you want to do exactly?

You can retrieve some values with @DdLookup or @DBColumn or with an agent or with CGI variables… (I presume that it’s for a Web client)

Thierry

Subject: RE: $$ViewTemplateDefault and document

we have an old db with our job vancancies out on the web. you can pull up the available jobs and look at the job descriptions. my job is to put our employment application online which will need to inherit the job title and department from the job vacancy. there will be a button on the bottom of each description that composes the internet job application. all of these vacancy views are controlled by the $$viewtemplatedefault, so i really have no handle to the documents and the title/department to inherit onto the application.

thanks,

jason

Subject: RE: $$ViewTemplateDefault and document

Assuming one job app to one vacancy…

If the application is a child of the job vacancy, from the bottom of the vacancy doc, your button could use the URL …/foJobApplication?OpenForm&ParentUNID=JobVacancyUNID. If the application form is a response, is set to inherit values, and has fields computed to the values from the job vacancy you want to inherit, then the parentUNID query string will work.

If you don’t want to have to open a job vacancy doc, then just put a link in a view column for each job vacancy doc.

Subject: RE: $$ViewTemplateDefault and document

that’s the way i was originally trying to set it up, but when you use the $$viewtemplatedefault… it seems as if the document is not really open. you don’t see the doc id in the url or anything. i had it working using the parentunid in the url, but that’s with removing the viewtemplate.

jason

Subject: RE: $$ViewTemplateDefault and document

I use view template forms all the time and have not had an issue, so I just want to make sure I am understanding your problem…

If you put a UNID field on the top of the vacancy form and compute it to “@Text(@DocumentUniqueID)”, when you open the document from a view on the Web (using the view template), what value displays in the UNID field? If it is the document UNID, then your button formula should just be able to reference this field value to compute the URL for composing the job app. (Although I don’t ususally have to use a UNID field. Usually just @Text(@DocumentUniqueID) works well enough.)

Subject: RE: $$ViewTemplateDefault and document

From this

https://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/d507440793c6065785257210005599dd?OpenDocument

… use inheritance form property (Look in Designer Help for more infos about

it)

instead use checkboxes, use a buttons to open an URL something like this

(column formula):

"input type="button"

onClick="window.location.href='inheritanceForm?OpenForm&ParentUNID="+@Text(@Doc

umentUniqueID)+“'" value="Create internet job application">]”

Where “inheritanceForm” is form which contains a fields which inherit values.

Where “ParentUNID” will be the ID of document in view.

Thus, when you click on the button, you compose a document (with a form you

have specified in URL) which will inherit values…

HTH

Thierry