WordTemplateConfig Rules – User-defined Bookmarks

This entry is part 11 of 18 in the series Setup Guide - Bookmark Templates

The WordTemplateConfig rule group allows you to create your own bookmarks. In some cases this can be a simple entry, and in other cases your user-defined bookmark could run a stored procedure and return bookmark values.

To print a list of routees at the bottom of the generated template, you must use the RR_ prefix to retrieve the multiple routees. This also means you must use a table and insert each field in a separate column. In this case, one routee could have a short name (ex: Jim Fox), and one routee could have a longer name (ex: Alexandra Pendleton-Walker). When printing the routee name and company, you could receive the following:
when you want

You can achieve your formatting goal by creating a user-defined bookmark in the WordTemplateConfig rule.

Rule = DocRoute.NameCo DocRoute is the table storing the data, and NameCo is the user-defined name.
Filter Value = a Doc Type (or blank for all Doc Types)
Result Value = ‘[DocRoute_UserKey], [DCO_DocRoute_UserKey]’ The two separate bookmarks in the square brackets with the comma and the entire expression enclosed in single quotes.

 

Notice too the DocRoute:FieldList rule with the Result Value = NameCo, the name of the user-defined bookmark. By adding the new bookmark to the FieldList, sfPMS will know the gather the data for the bookmark. See also KBA-01348.

You can also use IF statements. The user-defined bookmarks below were created for projects that did not have a Project Manager. In these bookmarks the Project Manager is usually the person who signs off on all the project documents, but on some smaller projects, a Project Manager isn’t assigned, and the Construction Manager handles all the paperwork. The user-defined bookmark says “If the PMAddr_data exists, print the PMAddr_ data, otherwise print the CMAddr_ data”. The four bookmarks below are used as a set to print the Name, E-mail Address, Phone Number, and Fax Number on various Project Templates.

DocAddr.SignPerson → IIF(=@HasData(PMAddr ), ‘[PMAddr_person]’, ‘[CMAddr_Person]’)

DocAddr.SignFax → IIF(=@HasData(PMAddr ), ‘[PMAddr_Fax]’, ‘[CMAddr_Fax]’)

DocAddr.SignEmail → IIF(=@HasData(PMAddr ), ‘[PMAddr_email]’, ‘[CMAddr_email]’)

DocAddr.SignPhone → IIF(=@HasData(PMAddr ), ‘[PMAddr_Phone]’, ‘[CMAddr_Phone]’)

You can also pull data from one document to another. In the example below, The Invitation to Bid contains a user-defined Data Type Subcontractor’s Bid Due. Any RFQ sent to potential bidders should contain this data.

Rule = DocMasterDetail.SubDue DocMasterDetail refers to the DocHeader info–which is where the Project Number will be found. SubDue is the user-defined bookmark.
Filter Value = a Doc Type (or blank for all Doc Types)
Result Value = ‘=@DV(DateStart,0001,[DocHeader_Project],6d384462-6c13-42c5-a744-8e70dbd7e95d,4bf304c6-8aaf-4ff3-a464-a389fb0c09f2) Using the @DV function to find the DateStart field of DocNo = 0001, of this project, followed by two GUIDs, one for the Doc Type where the Date is entered and one for the Date Type on that Document. See KBA-01505.
Series Navigation<< WordTemplateConfig Rules – Trouble-shooting RulesComputed Fields – Bookmark Templates >>