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

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

Recommended Posts

Posted (edited)

I can't go into too much detail, much the same issues exist in a recipe, or a tech tree in some game. 
I am converting a variety of information into a FMP.19 database. 
One of the items is a part, which may require other parts to make it. Each part is listed with its immediate parents, so for example:

Part (1): No parents
Part (2): No parents
Part (3): (1)
Part (4): (2) and (3)
I need to be able to identify all ancestors, not just the immediate parents I am given, so from the above data I would need to identify (4) as (1), (2) and (3), since (3) also requires (1).

I can do this with a recusive loop that traces up the parentage tree, and takes a bazillion searches and markers.
There are only a couple dozen items in the sample data, but this will certainly exceed a thousand items, possibly many thousands.
Some of the ancestor trees could be dozens or potentially hundreds of items long, tracing up through lots and lots of generations.
This is exactly the sort of problem FMP is designed to solve, but darned if I can figure out any other way to do it.

Does anyone have any suggestions on possible strategies?

Thanks for your time. 

Edited by elipsett
Posted

You are describing a BOM (Bill Of Materials). This has been discussed several times, most recently here:
https://fmforums.com/topic/107672-shopping-list/?do=findComment&comment=485232&_rid=72594

Note that with a tree "potentially hundreds of items long", you won't be able to rely on a cascading calculation. You will need to produce the list by script - either on demand, or every time you make a change anywhere along the tree. In any case, it should not "take a bazillion searches and markers". You just keep moving up (or down) the tree using the Go to Related Record script step. That doesn't mean it is a trivial task, but it should be doable. On the same note:

3 hours ago, elipsett said:

This is exactly the sort of problem FMP is designed to solve

Not really. Filemaker is a relational database. It makes it possible to implement a BOM, but it is at the edge of its capability.

 

 

  • Like 1
Posted

Thank you. 
Yes, it would be a BOM; never occured to me to look in that direction even though I've been used by them in the past.
And the link you provided offers a new strategy to look into, which I will do.

 

 

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