Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

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.

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