Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Report Writer Calculated Field LFT_STR

Posted on by Microsoft Employee

I am trying to create a calculated field for a RM Sales Invoice for a recurring batch to decrease the overall length of the invoice number in recurring batches. right now, our invoice numbers look like this D-12345600000000001. I want to create a calculated field to display the leftmost 8 and rightmost 4. I started by trying to create only the leftmost of the field, so I created the following calculated field:

Result Type: String

Expression Type: Calculated

LFT_STR(RM_OPEN_TEMP.Document Number 8)

The 8 I inserted as a constant integer

When I go to print the invoice, I am getting a message that there is an error in the calculated field. I'm not sure what I am doing wrong. Any assistance would be greatly appreciated.

Thanks!

Kim

*This post is locked for comments

  • Verified answer
    L Vail Profile Picture
    L Vail 65,271 on at
    RE: Report Writer Calculated Field LFT_STR

    HI,

    You need three calculated fields. I would approach it this way.

    I would use the User-Defined System Fuction RW_Left and then the User-Defined System Function RW_Right and then concatenate the two fields together using STRIP in front of each formula. Here's what the three calculated fields look like:

    !Left8= FUNCTION_SCRIPT(RW_Left RM_Sales_WORK.Document Number 8 )

    !Right4= FUNCTION_SCRIPT(RW_Right RM_Sales_WORK.Document Number 4 )

    !ShortDoc= STRIP(!Left8 )  # STRIP(!Right4 )

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans