getting used to glide.
In a dashboard i want to show 2 sum field of filtered entries (request is done via a custom search field like in the example below) beside the complete results.
It should show:
Sum of the numbers
Count to the entries
Can anybody help here? Would be really great.
Thanks, Sabine
Since you are using a custom search (which I assume is a text entry component), you should be able to use that same value in your table, and then use an IF column to return the numbers for the rows that match the search. Then you can use a Rollup column to sum those searched row values in the IF column, as well as another Rollup to count the number rows in the IF column.
Thanks, @Jeff_Hager. I get the basic concept but iām still too much a beginner to be able to set this up. Also checked with Chat GPT but it doesnāt understand the IF ELSE column from glide completely.
Could you give me a hint reg. the first 2 steps? This would be kind.
So, i have to check the searchInput field (which contains the text entry input) with boolean or how?
And, in the IF ELSE i can only select the columns and no formula.
I started with:
IF searchInput INCLUDES svsearchfield (this is a singlevalue field connected to the main database)
THEN
and here iām lost.
Iād have thought that i should increment a number or something but i can only select from the available columns.
OK, so I see that you are using this filter function in glide.
What I would recommend is to instead move that logic into the table, by creating an IF column that should look something like this:
IF FILMTITEL does not include filterFilm
Then 'false'
IF PRODUCKTIONSFIRMA does not include filterFirma
Then 'false'
IF searchField does not include searchinput
Then 'false'
IF FORDERJAHR does not include Jahr
Then 'false'
ELSE 'true'
You can then use the resulting true/false to filter your collection.
Once you have that, then you can duplicate the IF column and instead of returning true or false, you return your number column or zero. So only the rows that match your criteria should have an IF column with ātrueā and an IF column with a number that is not zero. The rest should be false and zero.
With that, you can go back to your single row table and create two rollup columns. The first rollup column will COUNT all of the ātrueā values:
And the second rollup will SUM the numbers that are not zero.
I think i canāt easily transfer the filter logic to the tables because i use this separate single row table. Some of the parameters/values are not visible there or some are not visible in the main database.
Like, this
the searchInput field is in the āworkingā table and i canāt access it via the āalleā table. I tried this relation thing, but it didnāt work. Is it maybe because my main table is connected to Airtable?
Yep, but iād receive only one dedicated value related to below selection.
I would need the whole bunch of data. In Airtable you link the whole column and not a single value.
If itās a single row table, you should select āFirstā. This will take the first (only) value in the column and apply it to all rows in the destination table.
If you have multiple values (columns) in your working table that you need in your data table, then youāll need one single value column for each.
PS. Glide is not AirTable - so what works in AirTable doesnāt necessarily work in the same way in Glide