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.

How to list all fields in related databases.

Featured Replies

  • Newbies

I have ten related databases, what is the best way to generate a listing of all unique fields in these databases?

Hi,

First of all, welcome to these Forums.

What do you mean by unique ?

The FieldNames( ) would return a list of all fields in a specific layout in a specific DataBase.

So if you set a Layout "AllFields" in each database, and drop all the fields there, you should get a list of those fields.

Then List Db1 &"

Actually, if you use FieldNames(DBname,"") you will get all the fields that are in the file.

BobWeaver said:

Actually, if you use FieldNames(DBname,"") you will get all the fields that are in the file.

Why read The Bible when all I have to do is read Bob's answers.

Slightly different technique:

Use Status(CurrentFileName) and put a calc field in each DB:

"AllFields" = FieldNames(Status(CurrentFileName), "")

You can then view each file's AllFields in one of the files using relationships.

Sam

  • Author
  • Newbies

Thanks for replying.

I am a FMP user without prior scripting experience. Can you please explain your replies for my experience level? Thanks.

The 10 related databases were created by someone else. I need to merge my existing data from my single database into those 10 related databases.

As a first step toward matching the fields in my single database with the fields in the 10 related ones, I need to generate a (printed) listing of all of the fields in the 10 databases.

What I have done is to print the field definitions from the other person's main database. But it would be better if I could get a single list of the unique field definitions in all 10 databases.

By "unique," I mean that if any given field (e.g., student ID number) is included in more than one of the 10 databases, the list that I want would include that field only once.

Thank you again.

You might want to have a look at this sample file:

http://www.fmforums.com/threads/showflat.php/Cat/0/Number/51415/page/8/view/collapsed/sb/5/o/all/fpart/1

It's an automatic documenter utility. As well as doing other things, it will grab a list of all field definitions in the current set of open files. You can then search and sort by file name to get a list of the unique names.

Note: to eliminate the duplicates you will need to run a duplicate finder script like the one given in the Filemaker manual on page 10-13.

  • Author
  • Newbies

Thanks BobWeaver! I downloaded it and I'll let you know how it turns out.

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.