Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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!

Posted

Have you looked at the Inventory example that comes with FileMaker Pro?

Posted (edited)

 

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 PartsRelationships.thumb.PNG.592c74aab6d9dd5c44e8f91dd44c63f7.PNG

Edited by NewBoard
Posted

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

 

Posted
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!

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