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)

Unable to simply add a comma to a calculated field address line.

(0) ShareShare
ReportReport
Posted on by

Using GP2010, in an invoice report (SOP Blank Invoice Form) I'm attempting to add a comma between the city and state.  I've followed mbs.microsoft.com/.../MSD_GPModifySOPBlankInvoiceForm which makes sense but it gives me errors.

Here's an example Bill To address line as it currently works (we have 5 lines total):

Bill To Address Line 3
Expression Type: Calculated

FUNCTION_SCRIPT( rw_SelectAddrLine 3 "" RM_Customer_MSTR_ADDR.Address 1 RM_Customer_MSTR_ADDR.Address 2 RM_Customer_MSTR_ADDR.Address 3 "" RM_Customer_MSTR_ADDR.City RM_Customer_MSTR_ADDR.State RM_Customer_MSTR_ADDR.Zip Bill To Country (final))

Bill To Country (final) is a field that omits the country field for US-based addresses.

This field works fine.

If I edit it to read:

FUNCTION_SCRIPT( rw_SelectAddrLine 3 "" RM_Customer_MSTR_ADDR.Address 1 RM_Customer_MSTR_ADDR.Address 2 RM_Customer_MSTR_ADDR.Address 3 "" RM_Customer_MSTR_ADDR.City # ", " # RM_Customer_MSTR_ADDR.State RM_Customer_MSTR_ADDR.Zip Bill To Country (final))

I get an error.  I've tried both with and without the string concatenate operator (#) and am at a loss as to what to do next.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mick Egan Profile Picture
    3,561 on at

    Create a Calculated field for City and add this code:

    STRIP(RM_Customer_MSTR_ADDR.City) # ","

    Then Replace RM_Customer_MSTR_ADDR.City in your script with this calculated field.

    Regards,

    Mick

  • Community Member Profile Picture
    on at

    This was the solution.  Thank you!  Using ReportWriter is like trying to paint an entire room through a tiny hole in the wall.  So incredibly frustrating in both form and function.

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