Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Amount in Words on A/P Check

Posted on by 3,480

Hi:

I'm modifying Report ID 10412 (Report Selection - Bank), which is the A/P check.

Below is a screenshot of the Amount in Words, and below that screenshot are the two formula expressions used for this.  (My guess is that the second formula is some sort of "overflow" field.)

I need for the asterisks in the beginning to appear at the end, instead.  And, the phrase "US DOLLARS" need not appear.

How do I meet these two requirements?

Thank you!

John

pastedimage1657212850346v1.png

=Cstr(Choose(97,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))

=Cstr(Choose(98,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,155 on at
    RE: Amount in Words on A/P Check

    Try it as the Choose(98,Split(Cstr(ReportItems!FooterInfo.Value) inside the previously discussed right and len functions.

  • john.ellis Profile Picture
    john.ellis 3,480 on at
    RE: Amount in Words on A/P Check

    Hi Josh:

    I'm afraid that I got an error, upon trying this.  Below are the two "codings" that I made -- one for each field for check amount in words.

    Any thoughts?

    John

    =right(Cstr(Choose(97,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2),len(Cstr(Choose(97,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2))-4)

    =right(Cstr(Choose(98,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2),len(Cstr(Choose(98,Split(Cstr(ReportItems!FooterInfo.Value), Chr(177))))).GetData(1,2))-4)

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,155 on at
    RE: Amount in Words on A/P Check

    Not quite a copy/paste. Add the suggested functions to the existing content. You can copy the existing content to paste it into the suggested functions as you need the string twice. Give it a try

  • john.ellis Profile Picture
    john.ellis 3,480 on at
    RE: Amount in Words on A/P Check

    Thanks, Josh!  Do I simply paste the code from the original posting into the text box?

    And, since there are two fields for amount in words from what I see, do I paste into both text boxes?

    John

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,155 on at
    RE: Amount in Words on A/P Check

    At the bottom of your original post you have what looks to be content from a text box on a RDLC layout. That is where the code should go.

  • john.ellis Profile Picture
    john.ellis 3,480 on at
    RE: Amount in Words on A/P Check

    Also need the asterisks moved.  

    I'm leery about messing with currency stuff just to make a modification.

    Thanks, though!

  • john.ellis Profile Picture
    john.ellis 3,480 on at
    RE: Amount in Words on A/P Check

    But, where do I "put that coding"?  That's what I need help with.  When it comes to programming BC, I don't even know where to begin.

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,155 on at
    RE: Amount in Words on A/P Check

    GB version looks a bit different to yours but effectively the Right() and Len() functions will do what you need. Adapt this to fit yours: right(Code.GetData(1,2),len(Code.GetData(1,2))-4)

    Gives you this type of output:

    pastedimage1657224354538v1.png

  • Suggested answer
    Dallefeld Profile Picture
    Dallefeld 11,423 User Group Leader on at
    RE: Amount in Words on A/P Check

    Do you have a currency code for USD setup and is the description US Dollars? What happens if you simply remove the description?

  • john.ellis Profile Picture
    john.ellis 3,480 on at
    RE: Amount in Words on A/P Check

    Thanks, Josh!

    Do I place that code inside of a text field on the report?  I'm not very swift on programming.  :)

    John

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans