Jump to content
Server Maintenance This Week. ×

need help with duplicating records


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

Recommended Posts

  • Newbies

I am having a problem working with duplicated records in FM4 for Mac.

I am create a class schedule. Each record in my DB contains class info including class name, class length, start and end times, etc.

I need one record for each 1/2 hour that a class runs. For example, if a class runs from noon to 2 pm, I need four records, each identical except for the start times (which would be 12:00, 12:30, 13:00 and 13:30). I need a script that will create these records when it sees a class whose length is greater than 30 minutes.

I am trying to use the following script:

Go To Layout [Refresh window, "ShowAll"]

Find All

Sort [Restore, No dialog]

Go to Record/Request/Page [First]

Loop

If ["EndTime > StartTime + 1800']

Duplicate Record/Request

Paste Result [select, "StartTime", "StartTime + 1800"]

Else

Go To Record/Request/Page [Exit after last, Next]

End If

End Loop

Classes are sorted by name & start time. The problem is that some duplicated records are inserted at the end of my sort order, which causes the script to exit w/o duplicating all the records I need.

I have tried inserting a few more 'sort' steps in the script to keep things in line, but it still didn't work for me.

Does anyone have suggestions on how to accomplish this?

Thanks

-sean

[ October 15, 2001: Message edited by: sean kelly ]

Link to comment
Share on other sites

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