AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • In-Person Gatherings
    • Power BI Workshop
    • Podcast
    • Rolodex
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica Report De...
PadLeft Function
 
Notifications
Clear all

Questions PadLeft Function

 
Acumatica Report Designer
Last Post by Tim Rodman 8 years ago
8 Posts
2 Users
0 Reactions
6,002 Views
RSS
Posts: 4
 ACM_Cdawkins
Topic starter
October 31, 2017 5:15 pm
(@acm_cdawkins)
Member
Joined: 8 years ago

Is there a way to pad a string in the Report Designer? I tried using PadLeft and I receive an error stating that you can only pad a one character field.  My goal is to use the concat function to string variables, but I need to pad left on one of the variables. In my formula I can use PadLeft('_',10,' ') and the underscore is padded left. However I would like to padleft('USD',10,' '); is there a way to achieve this option?

 

 


7 Replies
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
October 31, 2017 5:22 pm
(@timrodman)
Famed Member
Joined: 11 years ago

What would you want the end result to look like?

Are you trying to create an amount like this where there is a variable number of spaces between USD and the number?

USD    120.00


Reply
 ACM_Cdawkins
(@acm_cdawkins)
Joined: 8 years ago

Member
Posts: 4
October 31, 2017 6:06 pm
Reply toTim RodmanTim Rodman

I am trying to achieve the following below without the underscore.

A0000000013521070067000301429001600                   _USD              


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
October 31, 2017 8:54 pm
(@timrodman)
Famed Member
Joined: 11 years ago

So you want to pad it with spaces, but you could need a different number of spaces depending on how long the number on the left is?

Do you always know how many characters the entire thing should be, starting from the "A" all the way until the "USD"?


Reply
Posts: 4
 ACM_Cdawkins
Topic starter
October 31, 2017 9:45 pm
(@acm_cdawkins)
Member
Joined: 8 years ago

Yes I will always know how many character starting from 'A' to the 'USD'


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
November 1, 2017 11:02 am
(@timrodman)
Famed Member
Joined: 11 years ago

What if you use a combination of Len and PadLeft?

Len will tell you the length of a string. So you could use Len on A0000000013521070067000301429001600 (I'm assuming that the length could vary depending on the data), then back into the number of spaces that you need to feed to PadLeft by subtracting the Len value from the fixed length of the entire thing.


Reply
Posts: 4
 ACM_Cdawkins
Topic starter
November 2, 2017 4:16 pm
(@acm_cdawkins)
Member
Joined: 8 years ago

Thanks for your help.


Reply
Tim Rodman
Posts: 3204
 Tim Rodman
Admin
November 2, 2017 4:20 pm
(@timrodman)
Famed Member
Joined: 11 years ago

Were you able to solve the problem? If so, I'd love to see the formula that you came up with.


Reply
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,530 Topics
  • 11 K Posts
  • 21 Online
  • 2,418 Members
Our newest member: Chad Treadwell
Latest Post: Negative/Credit Inventory Value?
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2026 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×