July 24, 200421 yr I have a database with mulitple tables. With one button I want to transfer a record from one table to another. Is there a way to do this other than copy and pasting into every field? Heathbo
July 25, 200421 yr Author I already have identical fields in both tables and layouts. Essentially I need to get record A in table 1 into table 2. Since the fields are identical in both tables it shouldn't be any problem, right? I guess if no one knows of a way to do this I could always use a script to copy from the fields in table 1 and paste to the fields in table 2. I just thought there might be an easier way.
July 26, 200421 yr Author I can do that if I want to import the whole database. What if I wanted to just import one record? For example: In table 1 there is a button on the record you are looking at. When you push that button only the record you are looking at is imported into table 2. Is there a way to narrow down what records are imported with the import command?
July 26, 200421 yr Maybe what you could do is create a unique identifier (lets call it ID). In the first table Create a script which copies the current ID; enters find mode, searches for current id then exports to a pre-specified filename, then moves to the appropriate table and imports that same record. As you've saved it as a pre-defined filename it should be no problem. You will have to do 1 of 2 things. either export the file temporarily to the user's c: or use a plugin to export the file to say a name which equals the field i.e record 12940 gets exported as 12940.tab etc
July 26, 200421 yr Many years ago I faced the same problem and solved it exactly the same way. 1) Segregate out the record you are interested in by copying a unique id and Finding that id. 2) Export the new found set (of your one record.) 3) Import into the other table. Works great
July 26, 200421 yr Am I missing something here? Has V7 changed the way import works? Import only imports the found set so to import a particular record, you just find it in the 'remote' file and then import. Perform Script [external- other file, "FindIt"] Import [Restore, Add Records]
July 26, 200421 yr Author Thanks all. I got it working. What I did is I added an ID number to each record. Then did the find. Filemaker 7 now allows you to import records into another table without having to export the record to a seperate file. So this worked out perfectly. Thanks again
July 26, 200421 yr To isolate one record from a found set I always use: show all records omit record show omitted I just think it's a bit cleaner than the find method.
July 26, 200421 yr However, it's not mulit-user safe. Better to use a self-relation and go to the related record.
July 27, 200421 yr two things: 1) as a matter of practice you should have a unique id field in every table you create 2) i think it's cleaner to do a set-field than a copy-paste. set a global number field with the unique id, enter find mode, set the unique id field with the global number value, and perform the find. this way, if the user has something in the clipboard it isn't lost, and your programming is transparent to the user. btw, brucer's method above is another good way to do this.
July 28, 200421 yr It has never been safe to do this - though the risk is probably small. If a new record is created with the right timing by another user while your script is running, you will end up with the new record in your "single record" found set. If you go to related record by record ID, that is the only record you will get, period. This point comes up regularly in other lists.
July 29, 200421 yr Filemaker 7 now allows you to import records into another table without having to export the record to a seperate file. For future reference, would someone mind filling me in on how one would perform this task? Thanks!
August 17, 200421 yr Author You use the import records/ file fuction. Then select the record your using. Then you just specify wich table data is going into which table.
Create an account or sign in to comment