Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Remove first # of characters of a field in report writer

Posted on by Microsoft Employee

Hello,

Trying to print a field.

Eg. CUST PO # 123456456568977. I only need to print PO # 123456456568977

Is this possible in Report Writer?

Any help is appreciated

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove first # of characters of a field in report writer

    Thank you! It worked!

  • Suggested answer
    Nanook Software Profile Picture
    Nanook Software 587 on at
    RE: Remove first # of characters of a field in report writer

    Yes, but you need to create 2 calculated fields to complete the task.

    Functions don't liked to be nested in Report Writer.

    We need to utilize the User-Defined Functions (System) to accomplish this...

    #1 Calculated Field (POLen) - Defined the # chars from the right we want to have

      Result Type = Integer

      Calculation = FUNCTION_SCRIPT( RW_Length POP_PO.PONumber) - 5

          POP_PO.PONumber = Is the PO Number Field from the table you need

          5 = Is the trim left length

    #2 Calculated Field (TrimedPONumber) - Is the timed String of the PO#

      Result Type = String

      Calculation = FUNCTION_SCRIPT( RW_Right POP_PO.PONumber POLen)

         POP_PO.PONumber = Is the PO Number Field from the table you need

         POLen = Is the right string length

    I hope this helps...

    User-Defined Functions are great, but not well documented.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans