web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Conditional Fields in Word Templates

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I'm trying to modify the RM Statement on Blank Paper Word Template. The client wants to see the document types in words, e.g. invoice, return, payment, credit memo etc...

 

In report writer I created individual conditional strings fields where the field "RM Document Type-All" from the temp table "RM Statements_TRX_TEMP" = 1 then print "Invoice" otherwise make it empty; then another conditional field for when 8 then print "Return" otherwise empty and so on.

 

I overlap each of these fields making them invisible when empty. This works perfectly fine if we wanted to use the report writer. But we want to use word template. I'm not able to overlap fields in word template nor does there seem to be the option to make a field invisible when empty.

 

Can anyone suggest a way to get the RM document types to display in words instead?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    You do this using Conditional fields in Report Writer that string together. You will create a conditional field for each type. For example, conditional field 1 tests the doc type for the value '1'. If it hits, you tell it the constant string 'Invoice' should be used. If it isn't '1', the false refers to calculated field 2. In calculated field 2 you test for the value of '2', if it hits, you set the constant string to 'Debit Memo'. The false condition is set to calculated field 3, and so on. You need to work backward so that you don't have to do it in 2 passes. Otherwise, you will need to do this in two passes, first create all of the calculated fields with a blank string as the false condition and then go back and change it to the correct calculated field you created.

    Kind regards,

    Leslie

  • Community Member Profile Picture
    on at

    Hi Leslie,

    Sorry I was away for a couple of weeks. Thanks. Your suggestion works great in RW. But how do I get this to work in Word Template? Being that there is still multiple conditional fields for each type, I do not know how to make a conditional field in Word Template.

    Is there a way in RW for me to make ONE field that will display the final type and that is the field I would place in the word template?

  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Yes,

    The conditional field that tests for 1 should be the field added to the layout. None of the other fields need to be added to the layout.

    Kind regards,

    Leslie

  • Verified answer
    L Vail Profile Picture
    65,271 on at

    Hi again,

    To illustrate, the first two conditional fields are displayed below. Only the Invoice Type 1 field should be added to the report. Ultimately, we're solving for the value of the first calculated field.

    Kind regards,

    Leslie

    calc_5F00_type_5F00_3.png

    If it isn't type 1, we check to see if it's type 3. We don't care about type 2 - you could do a check with another calc field.

    calc_5F00_type_5F00_3.png

    Here's the check for type 3, if it isn't type 3, we go on to the calc field for Type 4.

  • Community Member Profile Picture
    on at

    I have it working now but it seems it is skipping the first field, which is the invoice. It is showing blank in Word. But when I print the standard report, everything works fine. The "invoice" type is displayed as expected.

    thoughts?

    Thanks for all your help.

  • Community Member Profile Picture
    on at

    It looks like it is not just the "invoice" type. In Word, it is also not printing Debit Memos ( type = 3). Again this works fine when printing using the standard report.

  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Hi,

    Something about your report is not set up right. Mine works perfectly. Do your calculated fields look similar to the example windows? Are you just including the first on one your report? If you will, send me a package file of your modified RM statement and I'll look at it if you can send it this morning (Monday) to leslievail@earthlink.net. My e-mail will automatically send you a message asking you to click on a message that it sends back regarding spam, I'll be watching my 'suspect' mail if you can send it this morning.

    Kind regards,

    Leslie

  • Community Member Profile Picture
    on at

    Hi Leslie,

    Did you receive my email I sent this morning? I did not receive any automatic emails when I sent it.

    Thanks.

  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Hi Rukia,

    I received your email and have returned a package file to you that will work for your Word templates. In the package file you sent me, all of the conditional fields were stacked on top of each other. What you needed to do was to only include the first conditional field in the report (the one checking for Invoices). The others do not belong on the report itself.

    Kind regards,

    Leslie

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans