web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Writing Text File (Fixed Position Text File) change the space with zeros.

(0) ShareShare
ReportReport
Posted on by

Hi All,

I generated a fixed position text file.

I have a field value of size 10 but the field size is fixed as 15,  filling the remaining 5 spaces of the field with zeros now its empty spaces.
How to achieve it.

    f.outFieldDelimiter('');
    f.outRecordDelimiter('\r\n');
    f.write(strLfix("testing",15));
    f.write();

pastedimage1628066964304v1.png

How to replace the space with zeros?

Thank you
I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    You can use string functions to check the length of the value, and add leading zeros if needed. For example, strLen and strIns could be used to achieve the desired outcome.

    docs.microsoft.com/.../xpp-string-run-time-functions

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 613

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 455 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 292 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans