Hi @chistof, thanks for posting, and welcome to the forums!
You can reference fields from a linked entity using dot syntax, like this:
This references the
id field on the Pipeline Step entity record, which the Task entity record listed in the
sg_task field is linked to.
To break it down a bit further:
sg_task is a field (perhaps on a Version entity record) that links to a Task entity record
Task references the entity type of this linked entity record
step is a field on Tasks, linking to a Pipeline Step entity record
Step references the entity type of this next linked entity record
id is the unique ID field on the linked Pipeline Step entity record
See the API Reference doc on Shotgun.find for more details.
To get a field from a Shot record linked to a Version, you might do a find() on the Version entity that includes this field reference:
Hopefully that gets you the data you need. Beyond that, if there’s no direct linkage from the entity you are querying, you’d need to do a separate call to find data from another entity.