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 6769 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi Everyone

I am pretty new to FMP so please keep that in mind, if you try to offer me any help or suggestions. ???

I am a genealogist and would like to create a database that will help me keep track of documents I possess on each ancestor. Further, I would like to click a button for a particular record that would take me to a table or layout where the actual document is scanned into.

To explain a little better, I hope ....... Each record of the database will be for one ancestor and will contain such fields as Name, ID#, birth date, death date, relationship, etc. I can figure out all of that. What I need to know is how to create a large field that will contain several smaller fields within it that would appear like a spreadsheet, sort of. The large field (container?) would be named Records. The smaller fields within that would be something like Record Type, Name of Record, Document #, and a button to take me to the actual document image I have scanned in and inserted into this DB somewhere (another table?) This Records field with all its smaller fields would need to be such that I could make new entries into it as I collect and scan in a document. The records field would then appear to look like a spreadsheet.

I do hope I am making this clear enough. I am assuming this is possible to do but I need some guidance designed for a newbie.

Thank you to anyone that can help me!

Kathy

Posted

I believe you are describing a portal. See Help > Creating and managing layouts and reports > Adding fields to a layout > Creating portals to hold related records.

Posted (edited)

Thank you! That is exactly what I meant. Now that I know what it is I need, I have been able to implement it.

Now, I have another question, if I may........

I have created a database with two tables. Ancestor Records is the main one with one record for each ancestor. Each time I find a new document to scan in on the ancestor, I would like to click a button to run a script that would switch to the other table, Documents and Scans, create a new record doing a lookup (I think that is the term) from the record in Ancestor Records, and pasting in the info from the fields in AR to the same fields in D&S. I have been fooling around with the script editor, but all I get it to do so far is switch to the D&S layout and create a new record .......blank, no pasting of fields.

Here is my pathetic attempt at a script. Can anyone help me figure this out?

Go to Layout [ “Documents & Scans” (Documents & Scans) ]

New Record/Request

Pause/Resume Script [ Indefinitely ]

If [ ${Documents & Scans}???:TMG ID: = "" ]

Relookup Field Contents [ Ancestor Records::Surname: ]

End If

Exit Script [ ]

Thanks!

Kathy

Edited by Guest
Posted

The easiest way to create a related record is to start typing into the last (i.e. first empty) portal row (you need to enable creation of new records on the Documents side in the relationship definition). This will automatically set the foreign key of the new record to match the primary key of the current record in Ancestors. You shouldn't need to copy any other information from Ancestors to Documents - that's what relational is all about, not duplicating data.

If you want to script the creation, you need to "copy" the Ancestor's primary key BEFORE you go to other table and create a new record - otherwise you will not be able to establish a relationship. I put "copy" in parentheses, because copy/paste is not a good method. Use a script variable or script parameter to remember the parent's primary key, and Set Field[] to put it where it belongs, for example:

Set Variable [$parent ; Ancestors::AncestorID ]

Go to Layout [ "Documents" ]

New Record

Set Field [ Documents::AncestorID ; $parent ]

Go to Layout [ original ]

Commit Records

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