Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Searching upstream through a requirements tree

Featured Replies

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

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.

 

 

  • Author

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.

 

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.