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

Found this while browsing and wanted to add that exploring JavaScript or query customizations might be another approach. It lets you create more refined, dynamic filters for the Chart Block. Anyone else have thoughts or alternative solutions?

Bringing this one back up because it’s a great topic! Has anyone tried using Softr’s new features or integrations with these filtering techniques? I’m curious if there are any updates or improved workflows since this was last discussed. Let’s keep the ideas flowing—any insights or fresh experiences would be awesome!

I had a similar issue a while back, and it turned out the data source mapping was the part I had overlooked. Once that was set up correctly, the conditional filter behaved as expected. It’s always worth testing with multiple records because it can reveal small configuration mistakes. I’d also be interested to know if anyone has found a simpler workflow with the newer features.