Using custom entity for hierarchy in tk-multi-loader2

Hey everyone,
We have a Custom Entity in our pipeline, which is called Unit (CustomEntity01),
What I want to do now is to order/group our publishes in the tk-multi-loader2 by the same Unit.

At the moment the code for the specific Load Tab looks like this:

  • caption: Library
    entity_type: Shot
    filters:
    • [project, is, {type: Project, id: 384}]
      hierarchy: [sg_sequence, code]

which is of course giving me the grouping SEQUENCE → SHOT
Is it somehow possibly to get the entities to group like UNIT → SEQUENCE → SHOT?

I’ve tried something like
hierarchy: [CustomEntity01,sg_sequence, code]
which sadly isn’t working.

Also: Is there something like a list with possible keywords for this? How can someone know that the Sequence needs the keyword sg_sequence? What are the exact meanings of code, entity, content and so on (despite looking at the default example)… would be quite helpful to know where I can find this.

I’m thankful for every help I can get. I hope this is just a small confusion from my side.

Thanks!
Jonas

You’ll need to use the field on Sequences that links them to a Unit from within the Shot query in order to group them the way you want. For example, if your Sequence field name is “Unit” and the field code is “sg_unit”, then:

caption: Library
entity_type: Shot
filters:
[project, is, {type: Project, id: 384}]
hierarchy: [sg_sequence.sg_unit, sg_sequence, code]

If you need to know the field name and field code, just right-click on the field header in ShotGrid and choose “Configure Field…”

1 Like

I find the easiest way to browse field-names is the “column chooser”, you can also browse through to linked fields; in the case above you would be on your Shot entity page, and then in the column chooser, go to linked fields, then Sequence, and then you have a sub-sub-menu which should provide you with the sg_sequence.sg_unit… which incidentally, shouldn’t that be sg_sequence.Sequence.sg_unit ? Or do you not need to include the entity-type in the field path?

1 Like

Thanks both of you!
sg_sequence.Sequence.sg_unit gave me what I needed!

which incidentally, shouldn’t that be sg_sequence.Sequence.sg_unit ?

Yep! Thanks for the correction.