How to filter Chart Block based on the current record in Item Details page?

Hi everyone! :slight_smile:

I’m building a project management tool and I’ve run into a challenge. I have an Item Details page for a specific project, and I want to add a Chart Block inside this page to show metrics (like hours tracked or tasks completed) related only to that specific project.

Currently, the chart shows data from the entire table, but I need it to dynamically filter based on the recordId of the item being viewed on the page.

Is there a way to link the Chart Block to the specific item’s data?

Thanks in advance!

Hi @karyne

For that, you need to either map that Chart block to the same datasource table/board your item details block is mapped to, or you need to have a related/linked record on the table mapped to that Chart block that is linked to the other table that is mapped to the item details block. Then you will be able to use conditional filters with this conditions - “If mapped source’s Record ID is/is any of Current Record’s Record ID”.

You can learn more checking our help docs:

https://docs.softr.io/user-groups-and-permissions/conditional-filters#conditional-filters

https://docs.softr.io/building-blocks/item-details-block-#item-details-block