Manage Learn to apply best practices and optimize your operations.

Views and $$Viewtemplate

We all know a form titled '$$ViewTemplateDefault' (containing a $$ViewBody field) will display all the views within a db in a browser.

A form titled '$$ViewTemplate for Contacts' will display the 'Contacts' view. What if you have lots of Contact views and you what to have only the one '$$ViewTemplate for Contacts' form?

Well give the same alias to all the Contacts views. i.e. 'Contactsby Company|Contacts'
'Contactsby Name|Contacts'
'Contactsby Account Manager|Contacts'
'Contactsby Mail Address|Contacts' etc.

They will all be displayed in a browser via the '$$ViewTemplate for Contacts' form and other views will use the '$$ViewTemplateDefault' form.

To display the view name on the Web page add a computed for display field to the form with the formula @ViewTitle. Note the functionality of @ViewTitle has change between R4 and R5. In R5 @ViewTitle returns a list of the view name and all aliases. Use @Subset to return the required element of the list.

Cheers Simon

Dig Deeper on Domino Resources



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...