Replies: 1 comment 1 reply
-
what is your query now? I think I'd just write a conditional join clause, and change the joined rooms in the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Package
Form builder
Package Version
v4
How can we help you?
I have a list of buildings and each building has rooms (1:n).
In the buildings table I have a column that is defined as
sum("rooms", "size")
as it sums all the rooms' size values.Next step is to add a
SelectFilter
with room categories, and the sum() should only sum up the size of those rooms that match the selected category.How would I do this?
A few things I tried but did not manage to give me the desired result:
SelectFilter
wants to match to a specific column. Is there a good way to have a filter but not have it want to find a column of the same name? Can I declare it as "virtual" so it does not inject anything into the query? I worked around this by calling query() with a shorthand function that returns the very same $query, but this feels hacky...$livewire
or$component
) to access the filters, I got an error "Too few arguments". It seems that parameter injection does not work there as expected.Thanks to everybody who would take time to offer any advice :-)
Beta Was this translation helpful? Give feedback.
All reactions