Template Links

Introduction

When LibraryLink is opened from an existing record, the code and xgType of that record are passed to LibraryLink which returns any linked documents. When using Template Links we use a template in conjunction with a database view to construct a request (file or web) to retrieve documents. At its simplest level we could construct a url to carry-out a Google search for pages relating to a site using the site name. At a less simple level we could search a SharePoint installation for projects tagged with a particular funding source. TIn each case our template contains references to columns in the relevant database view. By editing the design of the database view we can include additional columns to those in the default views.

The database views to edit following the naming convention of dbo.vDOC_xxx for Planning trigrams and dbo.vDOC_xxx_Dossiers for others, where xxx is the trigram of the module being used. The table below lists all views currently in use for Template Links

For example: 

For the Agreements Module (Trigram: OVK), the dbo.vDOC_OVK_Dossiers view contains column headings for:

  • AgreementNummber
  • PlanUnitCode (i.e. the Site Code)
  • PlanUnitName (i.e. the Site Name)
  • UnitCode (i.e. the region code used by the site)
  • UnitName (i.e. the region name used by the site)

By changing the view we could include additional columns.

url template construction

The template is entered in Admin/Configuration/Template Links tab in LibraryLink.

  • Resource Type: File or Web
  • Record Type: Also called xgType or just Type on some interfaces. This is a code indicating which object type or module this template applies to.  Valid codes are shown below.
  • Name: A user friendly name for the link
  • url: The template which includes parameters derived at runtime to construct the url. Parameters are held in curly brackets and will all be column names in the relevant database view.

Examples

LibraryLink v4

And below is how they are entered into the configuration for LibraryLink v4.

Example configuration

If the template is not valid, either the url cannot be formed or the base url does not exist, then the link will not display on the viewer in CMSi.

LibraryLink v5

From CMSi Desktop v3.16+, template links can be edited within CMSi.  On the My CMSi Admin section there is a link to Template Links Admin.

This brings up an admin tab where the template links can be created and edited.  These are saved into the database instead of an XML file.

Views for Template Parameters

The table below lists the database view that relates to each category of Template Link.
 
Record Type Code View (desktop to v3.18.2) View (web G5+)
Planning - Sites CMSISite dbo.vDOC_Sites_Parameters CES.vDOC_Sites_Parameters
Planning - Compartments CMSIComp - CES.vDOC_Compartments_Parameters
Planning - Features CMSIFeat dbo.vDOC_Features_Parameters CES.vDOC_Features_Parameters
Planning - Projects CMSIProj dbo.vDOC_Projects_Parameters CES.vDOC_Projects_Parameters
Planning - Annual Projects CMSIAnProj dbo.vDOC_AnnualProjects_Parameters CES.vDOC_AnnualProjects_Parameters
Planning - Site Description CMSIPlanText dbo.vDOC_PlanTexts_Parameters -
Planning - Work Records CMSIWorkRecord dbo.vDOC_WorkRecords_Parameters -
Agreements OVK AMS.vDOC_OVK_Dossier_Parameters CES.vDOC_OVK_Parameters
Rights JRG AMS.vDOC_JRG_Dossier_Parameters CES.vDOC_JRG_Parameters
Property Transactions VGT AMS.vDOC_VGT_Dossier_Parameters CES.vDOC_VGT_Parameters
Ownership (Parcels) PCT AMS.vDOC_PCT_Dossier_Parameters CES.vDOC_PCT_Parameters
Land Edits (Kadaster) KAT AMS.vDOC_KAT_Dossier_Parameters -
Grants SUB AMS.vDOC_SUB_Dossier_Parameters CES.vDOC_SUB_Parameters
Heritage / Assets / Buildings CHM CHM.vDOC_CHM_Dossier_Parameters -
Heritage CHM_ELM - CES.vDOC_CHM_Parameters
Asset CHM_ASM - CES.vDOC_CHM_Parameters
Building CHM_BWK - CES.vDOC_CHM_Parameters
Contacts (Relaties) REL AMS.vDOC_REL_Dossier_Parameters CES.vDOC_REL_Parameters
Observations OBS OBSVEG.vDOC_OBS_Dossier_Parameters -
Observation Sets OBSET OBSVEG.vDOC_OBSET_Dossier_Parameters -
Vegetation Maps VEG OBSVEG.vDOC_VEG_Dossier_Parameters -
Survey & Monitoring - Sample SAM_SMP SAM.vDOC_Sample_Dossier_Parameters -
Survey & Monitoring - Item SAM_SVT SAM.vDOC_SurveyItem_Dossier_Parameters -
Survey & Monitorying - Survey Event SAM_EVT SAM.vDOC_SurveyEvent_Dossier_Parameters -

 

Modified 22/11/2023
Find out more