Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

How to nest conditional fields in Word Templates

(1) ShareShare
ReportReport
Posted on by 191

In GP Report Writer we create conditional fields so the result is either true with a value or bank.  On our report, in report writer, we place all the field on top each other and set them invisible when blank/empty.  When we stacked the fields on top each other only the one field that applied would print and the others would stay hidden..  I need to recreate this in Word Templates.  I have the conditional fields created in Report Writer, but I would like to know how to use them in Word to allow the correct field to only print.  Word doesn't allow you to stack fields.

Thanks!

*This post is locked for comments

  • Suggested answer
    L Vail Profile Picture
    65,271 on at
    RE: How to nest conditional fields in Word Templates

    Hi sbasye,

    In order to properly nest calculated fields in Report Writer, I use a different method. I explained it in some detail in the following post:

    community.dynamics.com/.../418704

    This post needed to print the document type in text. I didn't mention the available user defined function for that task because the focus of the post was how to nest conditional fields.

    The mistake I most often see made, and was also made in this thread, is that users stack all of the calculated fields on top of each other. That's not the correct way to do it. What you needed to do is to only include the first conditional field in the report. The others do not belong on the report itself.

    Please let me know if you need additional information for your situation.

    Kind regards,

    Leslie

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at
    RE: How to nest conditional fields in Word Templates

    As you said your conditioned field result is either true with a value or blank then you don't have to worry, just set hide when empty propert of the conditioned fields, and drag and drop all the fields on your word template.

       It will work.hide.png

  • Community Member Profile Picture
    on at
    RE: How to nest conditional fields in Word Templates

    Hi Sbasye,

    We had a similar problematic with our logo on the top left of our Word template. We wanted, depending of the client number, display different logos.

    We use a calculated field in the RW (just like you do) made it invisible (so it doesn't show when installed on our tempalte and putted it on our word template in the A1 cell. After that, a simple IF formula in Word did the trick : { IF {=A1 } = 1 "logo1" "logo2" }

    We had trouble with the formula at first since it can only use numerical values as condition ("= 1" in our formula).

    I realise that this dosen't apply exactly to your situation (you seem to have 3 variables where we had 2 logos) but I think there's definetly something you could work around with our experimentation.

    Hope it helps

    Have a nice day!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans