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.

Automating Field Names Defenitions

Featured Replies

Hi, long time no ask,

I have an interesting question wink.gif, what would be the best way to get the filed names from one database and paste them into "Field Name" field in DataDictionary database?

Let me explain, I'm creating DataDictionary database for explanation of the field names (trust me it's needed tongue.gif). Rather than copying/pasting I'd like to import the values of field names into the field called ""Field Name" in this new database.

I was thinking of using FieldNames function from AllFields layout, and then getting those values one by one into a repeating field, then using GetRepetition function to get those values. But the problem is that all the field names are in one record, and I need them on a (field name per record) basis. I want to avoid writing an awkward copy/paste script if possible.

Thanks for any brilliant insights/tips

You can export the field names (no calculations or anything), by using the Export type "Merge". You can then open this file in other applications such as Word and Excel (BBEdit, etc.). I use Excel for this, because I then can eliminate excess stuff easier than using a text editor, as you will see in the steps below.

Steps

1). You wont to isolate one record (because you have to have at least one record for this to work).

a). Find all, omit current record, find omitted, should give you one record for the file.

Now export that record using Merge as the type (be sure and put the export somewhere where you can find it (I usually put it at the desktop level, so it is easier to find).

2). Now open it in excel

a). You will be asked a few question that go like this. First window ask you what type of file this is, choose Delimited.

:. The next window will ask you what is the delimiter, check comma, then click on next, which should highlight the first field, if not, click next again, if so, click done or okay to continue.

3). You should now have two (2) Rows, and as many Columns as you had Field Names.

4). Delete the second Row, which was the data in the record you exported, and you now have a file that has just the field names. Save it as tab delimited text file (you can do a lot with a tab text file) and you can replace the export file if you wish.

HTH

Lee

blush.gif)

I just normally use FMP's option to print field definitions (but I print them to pdf).

I suppose that if you wanted to add more, then you could copy the text from the pdf file and then run a parsing script to parse it out to one record per field definition.

Developer has more options for reporting your database design.

  • Author

Lee, thanks for the reply.

I understand what you're saying, but this brings me back to cutting and pasting (if I import from the tab-delimitted file, it's try to import each name into each separate field in my Data Dictionary).

Thanks for the advise, though

  • Author

Russ, I can print to a test file, but again I'll wind up with cutting/pasting scheme (pretty much what Lee recommended).

I can run Design report in Developer, but that won't help me, 'caose I want to create custom dictionary for these convoluted field names crazy.gif

Cheers

  • Author

Ladies and Gents, I just found out a cool way to do this.

Design Report in Developer makes a field called Object Alternative Display Name that name of all objects in any database. I'll just delete the rest, and leave only field names. Then I'll import this field into my FiledNames filed in DataDictonary.

Have a nice weekend.

I didn't know you had Developer.

However, if you had then turned around and imported the file as a Merge file, it would have been all in one field.

Lee

blush.gif)

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.