Jump to content
Server Maintenance This Week. ×

Exporting field Titles


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

Recommended Posts

I'm wondering if there is an easy way to export field titles to a CSV? You know, the first line are the fields titles. I have 103 fields I need to export, I know I could set up a record number 1 and run a 103 line set field script that would set all 103 fields to the title (some of my exported fields are globals so that causes a problem I'll have to work out later). My guess is that there is an easier way to do this. This DB will be run on a weekly basis, therefore I need some sort of script for the user. Any thoughts? Thanks.

Version: Developer v6

Platform: Windows XP

Link to comment
Share on other sites

Use the Merge format to get the Field "Names" along with your data. Merge format is a comma separated text file.

You can script an export, and it will automatically name it the same name as you direct it to, and it will put it in the folder you choose each time, and you can do it all without dialog.

You really should play with the Export function in FileMaker and you can see may other possibilities of how it can work for you.

Lee

wink.gif

Link to comment
Share on other sites

Just when I thought it was fixed..... The merge file creates field names where it replaces the spaces with underscores "_". Therefore my other program which imports this merge file does not understand the field. Is there anyway to keep the field names with spaces in them? i.e. my field "Store Catagory" is comming out "Store_Catagory".

Link to comment
Share on other sites

You are correct, I forgot about the _ . There are two other formats, maybe one of those will do it for you.

If you type or copy and paste this into the Online Help (index window),

exporting,data, About file formats

It will give you all of the file types with a shor discription of what they are and both DIF and DBF formats include the fields (also the FileMaker format too) smile.gif

HTH

Lee

Link to comment
Share on other sites

Just tried them both. DIF didn't export perfectly into a CSV format (some hidden stuff going on) and DBF Titles had underscores and they were all capitalized. hum... Is there a way to append a file in an export? I could use a template CSV with all the titles already entered.

Link to comment
Share on other sites

Hi Jim,

The reason this caught me a little off guard is, that I learn to name my fields a long time ago when there were limits to the sizes of things like the names of files and fields (especially in DOS), So I just don't have spaces in my field names. In fact, I often use the underscore_ in my field names to denote their type (i.e. c_ NameFull (calculation, text result) = NameFirst & " " & NameLast).

There is a paper by Core Solutions called "Standard.pdf" that you might want to take a look at. It is their in-house policies regarding field naming etc. that their developers have to follow. I use a similar approach in my files.

http://www.coresolutions.on.ca/Resources/standards.lasso

Perhaps this would be a good time to update your files, and change your field names.

HTH

Lee frown.gif

Version: v6.x

Platform: Mac OS 9

Link to comment
Share on other sites

jimkent said:

Just when I thought it was fixed..... The merge file creates field names where it replaces the spaces with underscores "_". Therefore my other program which imports this merge file does not understand the field. Is there anyway to keep the field names with spaces in them? i.e. my field "Store Catagory" is comming out "Store_Catagory".

Couldn't you pass this through a Text editior such as BBEdit and do a find for the underscore and replace with a space and then import it into the other program.

Just a thought.

Lee cool.gif

Version: v6.x

Platform: Mac OS 9

Link to comment
Share on other sites

Yes, I'm going the search and replace route. And I agree about the naming convention. I am kinda stuck though, the program that is importing the csv file is a large company's application and when I first saw it myself I kinda couldn't belive it. Some fields have spaces, some are two and three words concatenated together with no space and none have underscores. But what are you going to do? They are a multi-million dollar company and "they aren't changing". oh well. Thanks for your help!

Link to comment
Share on other sites

This topic is 7343 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.