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.

Featured Replies

I am trying to import data from a MySQL database and need to somehow also import fieldnames to be the fieldname in FMP. Is there anyway to do that? I have a CSV of the fieldnames and I also have a MySQL dump of fieldnames and associated data.

Thanks for any help.

Edited by mountainx

If you have a .csv file that contains field names in the first row and data in the other rows, you can import it into a new table and designate the first row to be used as the source for field names in the new table.

 

  • Author

What about an existing table? If I deleted the old fields that corresponded to "last year's data", can I append the fields to an already existing table?

No.

If you need a new set of fields for each year, you are doing something wrong. 

 

  • Author

Well actually, we use this database once a year for a yearly survey so the fieldnames in the survey each year are unique - survey_numberXgroup_numberXquestion_number. So last year's data has absolutely no relevance and get deleted. It may be wrong, but it is the way it was designed. IS that still a no?

3 minutes ago, mountainx said:

the fieldnames in the survey each year are unique

It makes no difference. Adding data to a table should not require a change in schema. You should have a permanent set of fields that includes a field to store the year, if necessary.

In any case, it is not possible to change a table's schema programmatically. At least not from within Filemaker (it may be possible using a third-party application that connects to Filemaker via ODBC or JDBC).

 

  • 2 months later...

Hi,

hope it’s not to late to answer.

It really seems to make no sense to have new field names each year for the same kind of data.

If you can somehow create fields that you can reuse each year, then the following would be my suggestion:

Since you seem to know SQL, I would suggest FileMaker’s Execute SQL function. With a free plugin (SQL Runner from Dracoventions; super great product, btw.) you can do INSERT INTO as you wish.

The steps would be: 1) Paste SQL DUMP into a text field. 2) In a script, read line after line of the text field and put the data of each line into $Variables. 3) Using the Execute SQL script step you can easily INSERT INTO the lines into your FileMaker data base.

Hope this helps,

Gary

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.