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.

need help with duplicating records

Featured Replies

  • 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 ]

  • Author
  • Newbies

changing my sort order fixed this problem, script is working.

{Emily LeTilla Voice} "Nevermind"

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.