May 24, 20178 yr I have a table that contains dimensional data for parts. Each record has a unique ID, but also has another field with the ID associated with the part. I have another table that I'll be storing individual inspection data on. I was wondering if it's at all possible to parse the first table, and copy over all records that have a specific part ID to the second table whenever someone starts a new inspection record. Please let me know if I need to provide any more information and/or pictures. Thank you in advance for any assistance you can offer!
May 24, 20178 yr Author 18 minutes ago, Lee Smith said: Have you looked at the Inventory example that comes with FileMaker Pro? That won't work for me unfortunately. I don't have a simple relationship like that. I have Lots, tied to Part Revs, tied to Parts Edited May 24, 20178 yr by NewBoard
May 24, 20178 yr There are various ways you could do it. For example, you could create a script to get a list of the desired dimensions, and then loop over that list to create new records in the target table. So something like: Set Variable[ $source ; ExecuteSQL( "SELECT theID WHERE partID = ?" ; "" ; "" ; inspection::partID ] Set Variable[ $count ; ValueCount( $source ) ] Go to Layout[ the target table for the new records ] Loop Set Variable[ $i ; $i+1 ] Exit Loop If[ $i > $count ] New Record Set Field[ partID ; GetValue( $source ; $i ) ] End Loop
May 25, 20178 yr Author 18 hours ago, Fitch said: There are various ways you could do it. For example, you could create a script to get a list of the desired dimensions, and then loop over that list to create new records in the target table. So something like: Set Variable[ $source ; ExecuteSQL( "SELECT theID WHERE partID = ?" ; "" ; "" ; inspection::partID ] Set Variable[ $count ; ValueCount( $source ) ] Go to Layout[ the target table for the new records ] Loop Set Variable[ $i ; $i+1 ] Exit Loop If[ $i > $count ] New Record Set Field[ partID ; GetValue( $source ; $i ) ] End Loop Oh my gosh. Thank you so much Fitch. You have solved something that I've been stuck on for a few days now. This worked perfectly!
Create an account or sign in to comment