web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,160 Moderator on at
    RE: Writing Text File (Fixed Position Text File) change the space with zeros.

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 886 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 870 Super User 2025 Season 2

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 697

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans