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.

Timesheets not replicating to the next week

Featured Replies

  • Newbies

I have just inherited a FileMaker 7 database, served by FileMaker 7 Server. A major part of the database is used for Timesheets.

It used to be a FileMaker 5 database!

There is some broken functionality with a 'copy this weeks times and job numbers into next weeks timesheets form' button. I am led to believe this is since it was upgraded.

The script to run from this button from the timesheets layout of the main database looks like this

Perform Script ["Strip blanks" from file: "Log_Time2"] - strip blanks is a simple script to remove empty rows

Select Window [Current Window]

Perorm Script [increase G date 7 "] increase G date 7 script is to add on a week (7 days)

Go to Portal Row [select; Last]

Set Field [DB::TS G Trans N; Get(Portal RowNumber)]

If [GetAsNumber(DB::TS G Trans N) = 1]

Copy [select; DB::TS NameWeekYear]

Perform Script ["Decrease G date 7"] - go back to previous week?

Go to Related Record [show only related records; From table: "NMY Time Log";External;Using layout: ]

Perform Script ["Import From Time Log" from file: "Log_Time new week 2"] - I written this script below

Select Window [Current Window]

Perform Sript [increase G Date 7 "]

Else

Show Custome Dialog ["Message"; "Week already exists"]

Import From Time Log script (Log_Time new week)

Go to Layout ["Layout #2" (log_Time new week)]

Show All Records

Delete All Records [No dialog]

Import Records [No dialog; "Log_Time"; Add; Mac Roman]

Sort Records [Restore; No dialog]

Go to Record/Request/Page [First]

Perform Script ["Import Portal Loop"]

Import Portal Loop script (Log_Time new week)

Paste [select; Log_Time new week::G Rel Time Log]

Loop

Exit Loop If [Get(Found Count) = 0]

Perform Script ("Copy Job Number")

Go to Portal Row [select, Last]

Paste [select; Time Log::JN]

Perform Script ["Copy Stage"]

Go to Portal Row [select; Last]

Go to Portal Row [select; Previous]

Paste [select; Time Log::Stage]

Delete Record/Request [No dialog]

End Loop

I think these scripts probably work ok apart from one thing. When I locally open "Log_Time new week - 2" I get...

"Calendar lookup" could not be opened (not found) so I cancel it.

I then see - G Rel Time Log [] in the Header

In the body are "Stage" and "Job Number" fields, the text fields from the timesheets file.

Then there is a Related Table, it says at the bottom row Time Log(1,12+) with related fields ::JN (Job Number) and ::Stage

Calendar lookup is also supposed to be a related table as it shows up like this in specify field dialog.

Can any of you experts tell me a) What is this business with related tables in FileMaker 7 and B) How I can set up this calendar lookup relationship and c) if restoring that relationship is likely to make the timesheet functionality return

Thank you for any replies and sorry about the long scripty post when I could probably have asked the same question a lot more briefly.

Create an account or sign in to comment

Important Information

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

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.