AnsweredAssumed Answered

Creating records in one table based on records in another table

Question asked by jaytyo on Mar 1, 2013
Latest reply on Mar 4, 2013 by jaytyo

A little help please for a FileMaker newbie who is feeling the urge to write some SQL. I have a global variable, lets call it $$PID. I want to query table 1 with something like this:

 

select field1, field2 from table1 where table1.PID = $$PID. I have put that into a custom function with the ExecuteSQL function step.

 

I want to take those returned rows plus another global variable (lets call it $$InstID) and insert them into table2 which has those three fields and then show a list style layout of the records.

 

I will be executing this from a button on another layout where the $$InstID is created.

 

Any ideas how to call the function or parse and insert the records into table2? I know I can also do a Perform Find to get the records from table1, but don't know how to get the data into table2 especially considering the two fields from the SQL above are the only two matched fields.

 

Thanks,

 

Jay

Outcomes