Jump to content

Import pictures from a folder into a specific table/field


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

Recommended Posts

Hi All,

I have build a database for my medical practice.

The database has a main table called patients with all the patient details.

I have another table called photos, linked to the patients database through patientID.

I have a layout, drawing data from the patients table, with a portal drawing data from the photos table.

I want to place a button on the layout to import several pictures into the photos table at once.

I tried using a script with the "import records" command, to import from a folder, but FMP does not know where to import the data to....

I tried using the "Go to field" command to go to the container field of the photos table, but this does not seem to work.

I am sure I am missing something very simple, but I cannot figure this out.

Any help would be appreciated

Link to comment
Share on other sites

Run the import step from the photos table. However the issue remains to identify which patient the photos belong to. It simplifies things enormously if all the imported photos belong to the same patient, in which case the script would look something like this (in pseudo code):

Start on the Patients TO:

remember the patient id

go to photo layout

import records

set the patient id in each imported record with the patient id

return to the patient layout.

In practice this would probably be done in a separate window so the current window isn't disturbed.

Link to comment
Share on other sites

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