Example Formulas/Calculations (Mergefields)
All example formulas below are generic and may not work to your requirements. Your layout template will also affect the values so it’s important to always test before going live. Some formulas may result in a Syntax Error! especially in the Extras section, in this situation, you may have to add additional Mergefields (such as OptionsRRP) to counteract this.
If you get stuck, please contact our support team and they may be able to help.
Example formulas
Purpose | What the formula would look like in Word | Explanation of formula |
---|---|---|
RRP unit price per square meter | { IF{ MERGEFIELD RRP \* MERGEFORMAT }<"0" ""{ IF{ MERGEFIELD RRP \* MERGEFORMAT }>"0" { ={ MERGEFIELD RRP \* MERGEFORMAT }/{ MERGEFIELD ItemWidth \* MERGEFORMAT }/{MERGEFIELD ItemHeight \* MERGEFORMAT}*1000000} \* MERGEFORMAT} \* MERGEFORMAT } | If RRP is less than 0 then populate a field with zero value. If RRP is greater than 0, then populate the field with RRP/(Width x Height x 1000000) |
Total square meter of main inventory item (per line item) | { IF{ MERGEFIELD ItemWidth * MERGEFORMAT }<"0" "" * MERGEFORMAT }{ IF{ MERGEFIELD ItemWidth * MERGEFORMAT }>"0" { ={ MERGEFIELD ItemWidth * MERGEFORMAT }*{ MERGEFIELD ItemHeight * MERGEFORMAT }/ MERGEFIELD Qty * MERGEFORMAT}/1000000} * MERGEFORMAT} | If Width is less than 0 then populate a field with zero value. If Width is greater than 0, then populate the field with Width x Height x 1000000 |
Unit RRP Price | { IF{ MERGEFIELD Qty \* MERGEFORMAT }<"0" ""{ IF{ MERGEFIELD RRP \* MERGEFORMAT }>"0" { ={ MERGEFIELD RRP \* MERGEFORMAT }/{ MERGEFIELD Qty \* MERGEFORMAT }}} |
|
Populate Description with the word “Freight Charge” instead of “Extras” | { IF{ MERGEFIELD InventoryDescription \* MERGEFORMAT }="Extras" "Freight Charge"{ MERGEFIELD InventoryDescription \* MERGEFORMAT }{ MERGEFIELD OptionsDesciption\* MERGEFORMAT } | If The Inventory Description = Extras populate the field with Freight Charge otherwise populate with Inventory Description and Options Description. |
Unit price excluding options price | { IF{ MERGEFIELD OptionsAmount\* MERGEFORMAT }>"0" {= { MERGEFIELD RRP \* MERGEFORMAT }-{ MERGEFIELD OptionsAmount\* MERGEFORMAT }{ MERGEFIELD RRP\* MERGEFORMAT }} | If the Options Amount is greater than zero = RRP - Options Amount otherwise populate with the RRP. |