#1
|
||||
|
||||
How to implement addition into a nested IF mergefield?
Hi all! I've recently been teaching myself how to use basic merge fields in a professional template, and I've hit a bit of a wall when it comes to nested IF statements. I haven't seen anyone talk about this so I thought id put it out there. Code:
{IF {MERGEFIELD MFC_testlookup1} = "Yes" "82" + {IF {MERGEFIELD MFC_testlookup2} = "Yes" "82" + {IF {MERGEFIELD MFC_testBusinessType} = "Couple" "164" ""}}} |
#2
|
|||
|
|||
I think you need to add calculation fields into this.
= (Formula) field - Office Support What is it you are trying to accomplish? |
#3
|
||||
|
||||
Thank you so much for your reply! Ill look through the attached link now.
But I had the intention of creating a function that could add all of the results together if the merge fields were present/correct (I work in legal and would want to automate this as opposed to having to manually type it). I will also continue to look through Paul Edstein's field math document and if I find a solution Ill make sure to post it on here. Last edited by Charles Kenyon; 12-20-2023 at 09:35 AM. Reason: added link to field maths tutorial |
#4
|
|||
|
|||
Quote:
An IF Field contains truetext and falsetext parts. It does not contain subtraction or addition except as part of the test, that would be part of the calculation field. A calculation field can contain merge fields that are in IF Fields. Dealing with Fields in Microsoft Word |
#5
|
||||
|
||||
Hi Charles,
Unfortunately I don't think it is doable then, as this statement is dependent on whether or not the conditional statement can be involved. For more context, each mergefield is linked to a part of the database we use, such as sourcing whether or not the client has an attorney, and if yes, the charge will be £82, so on and so forth. The charges will then supposedly be added together if they appear as true. Can this work as an if statement? Or do I have to stick with a Formula. I've not really gotten too far with this |
#6
|
|||
|
|||
It can work with If fields, yes.
{ = { If { MergeField HasAttorney } = "True" "£82" "0" } + { If { MergeField Day } >= 3 "2" "0" } } This assigns a given amount to be included in the addition given passing a test. If the condition is not met you could have nothing or have a 0. |
#7
|
||||
|
||||
Thank you Charles it works
The finished result of what I'm going to use is below, and looking at it now I feel a bit silly its so straightforward. Code:
{ = { IF {MERGEFIELD HasAttorney} = "Yes" "82" "0" } + { IF { MERGEFIELD HasLPA } = "Yes" "82" "0" } } Thank you again! |
Tags |
if statements, merge fields, nested merge |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Looking for a way to implement building blocks | lodi123 | PowerPoint | 3 | 08-03-2017 04:33 AM |
“nested” IF/Then with Mergefield, utilizing Conga and Salesforce links. | aronfromct | Mail Merge | 7 | 05-16-2017 05:39 AM |
Addition | James__S | Word | 1 | 08-18-2016 06:20 PM |
Printing selected pages based on a MERGEFIELD.g. If MERGEFIELD=x then print pages 1,2,4 if MERGEFIEL | Richard.p | Word | 3 | 04-21-2015 01:14 AM |
How do I implement Outlook? | Saturn1 | Office | 7 | 05-27-2005 09:57 PM |