Jump to content
Sign in to follow this  

Duplicating Records

Recommended Posts

Hi all,

I am very new to FileMaker, therefore, I would appreciate any help.

This question may have been asked before, as I couldn't find similar solution, I thought perhaps I should raise the question instead of spending hours browsing the forum. Anyway, my problem is as follow:

I have defined a table with records of students who have enrolled for one particular training course - called "Course". At the end of the enrollment period, these records will be archived, which I have created a table called "history" to capture all the records. However, I don't know what is the easiest way to archive the "Course" records to "History". Basically, the fields in "Course" and "History" are the same.

Any suggestions or help will be very much appreciated.

Thanks in advanced.

Share this post

Link to post
Share on other sites

In the History Table just do an import of the Course file. If all the field names match it's quick and easy. Remember it works with the found set. Once you have done the import you can delete the other records.



Share this post

Link to post
Share on other sites

Thanks Michael for your reply.

I have been exploring Import, but I don't seem to be able to import from Course to History. Course and History are basically identical tables.

Anyway, I have scripted as follows:

1. Go to Layout ["Course" (Course)]

2. Perform []

3. Sort Records [No dialog]

4. Show All Records

5. Go to Record/Request/Page [First]

6. Loop

7. Perform Script ["Copyfields"]

8. Go to Layout ["Course" (Course)]

9. Go to Record/Request/Page [Next; Exit after last]

10. End Loop

The Script "Copyfields" is as follows:

a. Go to Layout ["History" (History)]

b. New Record Request

c. a series of Set Fields

The above loop is done properly, however, all the records in History have exactly the same data as the first found record in Course.

Where have I done wrong?

Appreciate your feedback.

Share this post

Link to post
Share on other sites

I think you are going about what you want to do the wrong way.

In your History Table create a script we'll name it Archive Courses.

The first step you will need to make sure happens is that you have the found set in the Courses File that you want to archive. This can be done within the script calling a script in the courses file or by manually doing it before the import.

Now you would use the Import Records Script step.

Import Records["Courses.fp7";Add;Windows ANSI]

For import options you would choose add new records and under arrange choose matching names.

You can do this manually also by going to File>Import File>Choose your file.



Share this post

Link to post
Share on other sites

Hi Michael,

You are right. I am complicating myself for something relatively simple. But I also guess that because I am relatively new to FileMaker, and a little worried about exploring the many options to accomplish a task. Anyway, thanks for your help, really appreciate it.


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.