Suspected Bug in Variable Prefilters in Charts

I have a circles module and a cities module (circles > cities). All fields mentioned below are text fields.
I have made a chart on the cities module that uses circle = ‘${record.values.circle}’ as a prefilter.
Problem is that this chart only runs on record pages. On non-record pages it is blank.

I tried another combination:
${record ? “circle = ‘${record.values.circle}’” : “TRUE”}
This should work, since it works on the chart builder page. Also just setting TRUE in the Prefilter box also works to ignore the filter. However it fails on non-record pages.

Another combination I tried was:
${record ? “circle = ‘${record.values.circle}’” : “‘’”}, but that gives an empty node set error.

Another combination I tried was:
circle = ‘${record ? record.values.circle : ‘’}’
but that actually filters circle = ‘’ on non-record pages, which makes sense, and shows all those records where the circle field is empty. I don’t want that. I want it to show all records on non-record pages.

I did try putting an always TRUE expression after the ‘:’, but that also does not work. I suspect the issue is that the non-record pages simply ignore the chart if the filter contains record interpolation even if there is a way out in the filter. Also, OR syntax would not work simply because it will return all records in a record page as well. is there a TRY CATCH or CASE like syntax I could use?

Goal: Is there and combination of Prefilter (simplified SQL), where the chart ignores the prefilter and shows all records if the record object is not there (on non-record pages), and uses the prefilter if the record object is there (on record pages)?

Currently I have sidelined the issue but making duplicate charts, one for a non-record page, and one for a record page, but that does increase complexity.

My Reply to:

Hi there,

This is long overdue, but we’d love to host a live Community meetup.

Big bunch of things to discuss, including:

Your feedback on Corteza and where it can be improved
Your (constructive) grievances
Corteza LTS
“@Human”, its new features (Agentic/TAQ/Connections) and backward compatibility with Corteza
Community building - we’ve traditionally not done so much of this, but wish to change that dynamic.

Can you please reply here with your intention to join us? I’ll follow up with each of you individually by email.

Kind regards,

Niall

I am interested in this opportunity and will like to meet the developers and the community live online. Please do reach out :slight_smile:

Currently, if you use ${record in a prefilter on a non-record page, it won’t work.