Including User Names in Email Bodies
Rather than signing off emails with your company name, or some static text like "Accounts Dept" you may want to sign off emails with the name of the user that submitted the record. This is possible by defining a linked table to the User table.
Start with the default setup of the PSI document type for posted sales invoices. The email body is signed off with the COMPNAME field. By default this field takes its value from the Company Information table as supplied by Linked Table no. 3
Create a Linked Table to the User Table
First, define a Linked Table to the User table (table no. 2000000120). Number this a Link No. 5.
In the subpage below define the link to this table. This tells Clever Document Delivery how to find the correct record to link to. We want the record from the User table which has the same User Name as the current user. This can be found by using a [[USER]] in the filter column.
- Field No. = 2
- Type = Filter
- Filter = [[USER]]
Use the Linked Table to Supply a Field Value
Now that we have a Linked Table to retrieve the User record which corresponds to the current user we can use that value for a document field. In this example we will use the record to supply the value for the COMPNAME field.
Enter a new line above the existing Linked Table #3 line.
- Source Type = Linked Table
- Source Type No. = 5 (i.e. the link to the User table defined above)
- Field No. = 3 (the Full Name field)
When the value of the COMPNAME field is evaluated the Full Name from the corresponding User record will be taken and used in the body of the email. If a User record cannot be found or if the Full Name field is blank then the Name field from the Company Information table will be taken instead.