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

Help a PHP/MySQL user understand Filemaker relationships


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

Recommended Posts

Posted

Hi,

I've been doing web development for the last couple years and have strayed from Filemaker. I've now been recruited to work on a complex Filemaker 7 database and am having a little trouble getting my head back into the way that FM handles working between multiple tables.

What I need to do is very simple to explain and would be easy in web programming. I'm in a certain table (TableA), and based on a value in tableA I need to search for all the records with the same value in TableB and then copy multiple records from TableB to TableC. Sort of like this

$SearchID=20 (a value in tableA)

select from TableB all records where fieldA=$SearchID

$row=result

for each record {

insert into tableC values (field1 = $row[filed1], field2=$row[field2], etc)

}

Because you're only ever really on one record in FMPro, I can't figure out how to do this! Can someone point me in the direction of a tutorial for complex inter table relationships, or tell me what script steps I should be using? If I'm being to vague or abstract, let me know what soft of information to provide to make this more clear.

I understand about portals, but how do I enter records into a portal from a layout?

Thanks guys, this is a huge help.

Posted

If there's no relationship between tables a and b, then you would just script a find where you grab the value in table a in a script parameter, the script navigates to find mode in table b, inserts the value of the script parameter into the search field, and performs the search.

If you have a relationship set up where tablea::fielda=tableb::fieldb, then you could do the find with one Go To Related Records script.

To create new records with all the same values in table c, you could do an import where you import records in a found set in table b into table c. This is easier than scripting in a loop where you capture all the values from table b in global fields, and copy them to a new record on each iteration.

If you want to use a portal to enter new related records directly, you must enable creation of related records right in the relationship definition. Then there will always be a blank row at the end of the portal where new data can be entered.

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