Leveraging Global Relational Variables insights for Enhanced Dashboard Filtering

I’m currently working on a dashboard in Directus and looking to enhance its functionality. The challenge I’m facing is that when I select an item using a global relational variable, I only receive the ID of that item. However, I need to access the entire set of fields associated with that item to use them for filtering in another panel.

For instance, when I select an item from a collection, I want to retrieve various fields (like field1, field2, etc.) from that item and use them to filter data in another panel. This would allow for more dynamic and relevant visualizations based on the selected item.

Request for Recommendations

I’m reaching out to the community for recommendations on how to achieve this. Specifically:

  • What would be the best approach to access the full fields of a selected item within a custom panel?
  • How can I ensure that these fields are available for use as filters in other panels?

I appreciate any insights, examples, or best practices you can share.

1 Like

Hey Nima,

Good question! Seems like the standard option only returns an ID.
Inside a custom extension, you could easily do this.
As an example you can use the current panel of Directus:

Seems like this line is being used for setting the variable data: