Jump to content

Retaining text format on export


This topic is 6508 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm trying to export a friend's fm database for conversion into html.

When my friend entered data into fm, he ignored his caps/caps lock key and let fm take over the function of putting a cap at the beginning of each entry and display the rest in lower case. When I export to a text file, I end up with entries that are all caps or all lower case, rendering the data useless.

I am relatively new to fm and although I'm sure the fix is simple, I can't find the answer anywhere. How do I do this? And can anyone recommend a good and comprehensive book on using fm - this is not a user friendly program once one gets past the basics.


Version: v6.x

Platform: Windows 2000

Link to comment
Share on other sites

You could create a calculation field for each field that you want to export, and use the Proper() function to captialize only the first letter of each word. (If that's what you want) Then just export the calculated fields. The amount of formatting you can do with calculations is limited in FM6.... v. 7 adds many new text formatting functions.

Link to comment
Share on other sites

If this is a one time operation you could simply (on a copy first mind, so you feel comfortable with the steps and the end results) simply get your found set (or all records), go to the first field and perform a replace contents on that field with a calculated result.

By replacing the contents of that field with itself inside a formatting result you can change the format of the field contents.

So, you can alter the format using Proper() for Title Case, Upper () for all uppercase and Lower () for all lower case.

Simply choose Replace contents from the records Menu and click the Specify Calculated result option. Enter one of the calculations below for the desired result.

Proper (The Active Field Name Here)

Upper (The Active Field Name Here)

Lower (The Active Field Name Here)

Remember - Work on a copy first. When comfortable you can do this on the actual data

Another option is to create a loop script to reformat your data to specifc formats.

This would allow you to reformat the data in the field itself and not require additional calculation fields.

To do this would require some additional fields for capturing a list of the field names, the starting field and active field. These would be globals.

You can then loop through the fields per record altering each as required and then going to the next record.

this is obviously more advanced but will enable you to easily modify the data after the fact, if you ever have to do this again.

Link to comment
Share on other sites

This topic is 6508 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

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