Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fixed length Format Exporting???

Featured Replies

I am working on a database that needs to be able to export data in "Fixed length Format". Is FileMaker capable of exporting data in this format?

I could not find any mention of this in my filemaker books or websites.

It's possible. But you have too adjust the data in your fields before. You need some calculations which add to every value as many

Hi 'BeckhamTX',

Quick answer... Yes, you can export 'fixed length' records.

Two important issues...

A. FMP does NOT create fixed length records... you have to create a calculation to 'pad' extra spaces to your data

B. FMP has no 'Fixed Length' file type option when exporting data... you have to use an existing file format

This said...

You could create a calc field that combines all the data from multiple fields and adds appropriate spaces between each piece of data. You could then export this data field to a 'Tab-Separated' file.

Hi BeckhamTX,

As Bob indicated, you need to create a calculation (text) and then export the calculation. This can be done by using something similar to:

Substitute(

Left(CustomerName & "(53 spaces)", 50) &

Left(LineItem::Total & Right(".00", Position(LineItem::Total & ".",".",1,1)+2-Length(LineItem::Total)) & "(15 spaces)", 12),...etc and then end with "

  • Author

Thank you all for your answers. What I had started working on was a seperate (calculation) field for each existing field. And a last field concatanating all of the seperate calculated fields. I used Left(field, number of characters). For example, Left(Fname, 25). This works fine for records that have 25 characters or more in the field, taking the first 25 characters and giving me a fixed length of 25. but for records with less than 25 characters, such as Mike, it only produces a field with those four characters....how do i add a variable number of spaces to pad to the right of the name depending on the length of data that is too short. i thought of doing an If statement, if the length is < 25, take the data and add spaces by looping 25-length of data times. is this the correct approach to take?

Thank you for all of your help.

Hi,

My purpose of giving you the example calculation was to show you how to pad for each field if less than the total spaces, ie, Left(CustomerName & "(53 spaces)", 50). Unfortunately, Forum will remove the spaces so I put them in parentheses but you should actually put those spaces within the calculation.

And it's fine to make a calculation of each field to test and be sure the calculation will give you desired result. But I don't suggest you leave each field as a calculation and then combine all calculations into one for export.

Instead, once you know your format is correct for each field, copy and paste each individual field calculation into ONE calculation and place an & between them. Then delete all your individual 'test' calculations. This will be much more efficient. smile.gif

LaRetta

Hi again 'BeckhamTX',

LaRetta was right... you need to add 'spaces' to your data... and, use one text export field (if possible) to combine all your data into before exporting.

Here is a simple calc to understand the 'padding' process... you don't need 'looping':

- "exporttext" field = Left(namefield&"..................................................",50)

- [Calculation result is Text; UNCHECK Do not evaluate if all referenced fields are empty]

NOTE: the example above uses the "." (period) character instead of space characters for ease of understanding.

HOW IT WORKS...

- the contents of 'namefield' is combined with 50 spaces

- the result of this combining process is 'cut' to the first Left 50 characters

- the field options cause 'text' to be displayed even if the 'namefield' is blank

EXAMPLE RESULTS...

- Bob............................................... (47 spaces)

- .................................................. (50 spaces)

- Bob Kundinger..................................... (37 spaces)

- Now is the time for all good men to come to the ai (NO spaces)

Hope this helps... Good Luck!

Bob Kundinger

[email protected]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.