magic5 uses Word mail merge fields to convert magic5 reports to Word and PDF
The following can be entered in the Field name prompt ...
- Template items are added using their unique name, as shown above
- Variables are prefixed with a $ sign using the syntax
$[variable name]
eg $Customer - Attributes are joined with their corresponding entity, identified by the variable name in the following syntax:
$[variable name]:[attribute name]
eg $Customer:phoneNumber - An attribute for template item that is based on a variable, such as a contact or a location, uses the syntax:
$[variable name]:[unique name]:[attribute name]
eg $Contact:siteContact:phoneNumber or $ListItem:partUsed:sg_prod_saleprice - The variable list includes:
- Customer
- Location
- User
- LoggedOnUser
- UserFullName
- LocationAddress
- CustomerAddress
- LocationAddressFlat (ie. no line breaks, uses commas)
- CustomerAddressFlat (ditto)
- FormDate
- Template
- Contact
- ListItem
- The attribute list includes:
Contact
name
phoneNumber
mobileNumber
email
jobTitle
User
displayName = Display name (device only)
firstname = First name
lastname = Last name
email = Email
initials = Initials
jobTitle = Job title
suffixTitle = Name suffix (eg.MIFSM)
role = RoleLocation
address = Address
postCode = Post code
phoneNumber = Phone number
faxNo = Fax number
sageCode = Sage code
officeNotes = Notes (office only)
deviceNotes = Notes (available on device)Customer
address = Address
postCode = Post code
phoneNumber = Phone number
faxNo = Fax number
sageCode = Sage code
productService = Product/Service
supplierCode = Supplier code
officeNotes= Notes (office only)
deviceNotes = Notes (available on device)List entries
These are only available for a list entry if they have been selected in the Additional Attributes for list entries tab for the list itself.
part_No = Part number
serviceInfo = Service info
sales_Code = Sales code
stock_Code = Stock code
buyIn_Cost = Buy in cost
chargeOut_Cost = Charge out cost
on_Hand = On hand
stockList_Type = Stock list type
stockList_SubType = Stocklist sub-type
asset_Make = Make
asset_Model = Model
asset_SerialNo = Serial number
asset_HoistMakeModel = Hoist make
asset_HoistModel = Hoist model
asset_HoistSerial = Hoist serial number
hs_procedure = Procedure
hs_riskProbability = Risk Rating - probability
hs_riskSeverity = Risk Rating - severity
hs_riskRisk = Risk Rating - risk
hs_residualProbability = Residual Risk - probability
hs_residualSeverity = Residual Risk - severity
hs_residualRisk = Residual Risk - risk
hs_controlMeasures = Control Measures
hs_hazard0 = Hazard 1
hs_hazard1 = Hazard 2
listItemImage = Associated image or document
email_text = Text of e-mail
variableValue = Value to use
VATRate = VAT rate (%)
vatCode = VAT code
customCodeAssemblyAndClass = Code assembly and class (advanced)
expandedText = Expanded text
headerLines = Number of header lines to ignore
columnUniqueNames = Spreadsheet columns unique names
primaryKeyFormats = Primary key specifications
importUnallocated = Import unallocated jobs
userKeyFormats = User key specifications
dateKeyFormats = Date key specifications
metresPerPixel = Metres per Pixel
colour = colour
templatefilename = Word document template
buttonText= button text for Word template
additionalSettings = additional parameters for Word template
ac_unitRefrigerantWeight = Refrigerant weight (kg)
ac_unitSerialNo = Unit Serial number
ac_unitHistory = Unit history
ac_unitTypeId = Unit type
ac_unitMake = Unit make
ac_unitModel = Unit model
ac_unitRefrigerantType = Refrigerant type
scheduledDayOffset = Scheduled day (rounds)
pricingProductivityType = Measurement type for pricing/productivity
sg_prod_desc = Product description (Sage)
sg_prod_code = Product code (Sage)
sg_prod_partno = Product part number (Sage)
sg_prod_lowstock = Low stock flag (Sage)
sg_prod_category = Product category (Sage)
sg_prod_type = Product type (Sage)
sg_prod_saleprice =Product sale price (Sage)
sg_prod_costprice =Product cost price (Sage)
sg_prod_unit =Product unit (Sage)