Query filters not accessing data from joined tables

I’m writing an add-on query that takes into account data from a bunch of tables (14 when all is said and done, I think). Rather than just returning data from all the tables, it uses the data on one table to determine what data to join from the next table.

The way you have the query builder should work just fine, except that I’m 99% sure there’s a bug.

When I’m selecting data in this level of the query builder:

…it works fine if:
-The value is static (ex: 60)
-The value is an input (ex: input: duration)

But it does not work if I use a value from another joined table (ex: activity.duration).

I can select the value from a joined table–but it does not compute it. If it’s a #, it uses 0. If it’s text, it throws an error.

The filters I’m trying to use with dynamic table data are:

None of them work if I use a joined table value. They only work with a static value or an input value.

Hi @michael! I haven’t been able to find a work-around for this, so just wanted to keep it on your radar :slight_smile:

Hi @ErinHWagner - Thank you for the re-surfacing it. We will take a look. Can you clarify if this only happens when you’re manipulating timestamps or have you noticed it on other data types too?

I’m working with timestamps, but I think it happens on other data types too because sometimes I get the timestamp’s hours or minutes and then manipulate that as an integer and it doesn’t work.

Hi @ErinHWagner - we just pushed a fix for this. So you can now use the timezone from a joined field in the filter for the query. I did not find any other place where implementing a joined field as a value for a filter caused an issue.

1 Like

It was giving me trouble in a couple spots where I was adding the integer activity.duration_in_minutes, but I did some spot checking and it appears that that–and location.timezone–are both fully functional.

Thank you so much!

1 Like