Jump to content

Duplicating Records


joec56

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

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.

Link to comment
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.

Link to comment
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.

HTH

Michael

Link to comment
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.

Thanks

Link to comment
Share on other sites

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