BAQ to find all active subassemblies

Our users have requested all subassemblies have the view as assembly flag set… I’m sitting here scratching my head as I can’t think of what field I can look at to determine if a given part is a subassembly. Sorry I feel like I’m forgetting something simple so looked around on part track and method tracker and can’t seem to think of the write way to implement this… Can someone point me in the right direction?

Are you looking for PartMtl.PullAsAsm?
If you need to work out if the material is a manufactured part, just join to Part table and look at the TypeCode field. M for manufactured

I think you may have indirectly answered my question. I don’t want to mark every manufactured part as view as assembly, I only want to mark view as assembly if it’s a subassembly. After reading your response and thinking more about this I’m thinking a subassembly(to me) is a manufactured part that has materials associated with it(PartMtl table), so I’m thinking I need a subquery on the BAQ to count the parts via the PartMtl, and if the count of parts is > 0 then it’s a subassembly so I should set the view as assembly = 1 :slight_smile:

Where I think I’m confused is when I think about jobs there is the Assembly Sequence to denote a subassembly. I was thinking that is a field somewhere on the part, but now I’m thinking there is logic to do kind of what I describe in the first paragraph above to determine Assembly Sequences on jobs?

So you want to include the final assembly as a subassembly though.
I was thinking that you only want the assemblies that are NOT final assembly, in which case, they will be seen in the PartMtl table (Field MtlPartNum). You can join PartMtl.MtlPartNum to PartOpr.PartNum if you want to check that it has an operation on it.

Thanks for the help, I think it’s a matter of me not being clear what I mean when I say subassembly. For some reason I was thinking this was a flag somewhere but I’m realizing it’s an idea I have in my head not a flag in the DB.

Have the PartMtl Table added twice. Linking the PartMtl.PartNum to PartMtl_1.MtlPart

Then add a table criteria of
PartMtl_1.PartNum <> null

Basically, PartMtl records will only show if they are a component of some other BOM