Skip to main content
Nintex Community Menu Bar
Solved

Conditional Formatting in word document - Null fields

  • May 15, 2019
  • 5 replies
  • 574 views

I am struggling to write an if then statement for a null condition.  Here is what i am trying to do:

 

If all fields have content in Salesforce, show this way:

Attendee Name, Attendee Title 

 

If there is no title in Salesforce, show this way:

Attendee Name 

 

Here is the code I am putting in Word 

<<Attendee_Attendee_First_Name>> <<Attendee_Attendee_Last_Name>> { IF <<Attendee_Title_Form>> = “” “” “, <<Attendee_Title_Form>>” *MERGEFORMAT}

 

When I run the report - I get this:

First Last IF Title = “” “” “, Title”

 

or if there is no title - I get this:

First Last IF  = “” “” “,”

 

I can't figure out how to write the code in Word.  Any help would be appreciated

 

Thank you,

Karen Himes

Western Energy Institute

Best answer by DocGenVinnie

Try this.  You need to insert the text by creating a formula field. 

 

https://www.youtube.com/watch?v=mFs0rbIxz3Y

 

 

5 replies

DocFather_Ray
Nintex Employee
  • Nintex Employee
  • May 16, 2019

@himes  You need to wrap your field tag in quotes for your statement to work. Try this:

 

<<Attendee_Attendee_First_Name>> <<Attendee_Attendee_Last_Name>> { IF "<<Attendee_Title_Form>>" = “” “” “, <<Attendee_Title_Form>>” *MERGEFORMAT}

 

If that doesn't work, attach your template and I can take a look.


  • Author
  • May 16, 2019

First off - thank you so much for responding!  I put the code in using your suggestion and still get the output with the code in it.  I'm attaching the template and the product for you to take a look at.


  • Author
  • May 16, 2019

Here is the product of the template when i run it.


DocGenVinnie
Nintex Employee
Forum|alt.badge.img+7
  • Nintex Employee
  • Answer
  • May 16, 2019

Try this.  You need to insert the text by creating a formula field. 

 

https://www.youtube.com/watch?v=mFs0rbIxz3Y

 

 


  • Author
  • May 16, 2019

This is EXACTLY what I needed!!  You have opened up so many opportunities for me.  Thank you so much!  It worked perfectly.

 

Thank you,

Very happy DocGen user,

Karen