How do I count items in a list that meet a condition that are in a repeating group?
I have a repeating group that has all jobs. Each job has a list of tasks. I want to show a count of how many tasks each job has (works ok) and also how many are completed tasks (can’t get it to work).
Example:
Job one has 10 tasks 2 are completed
Job two has 12 tasks 4 are completed
I can get the total # of tasked but I am having a heck of time figuring out how to filter just the completed task that have in a is_completed (yes/no) field.
This part works:
This part gives me the number of tasks
I have Search Job’s Tasks: count (where search is type jobs and jobs ID = currents cell job’s unique ID
This part does not works:
However I can’t figure out how to filter the same results of tasks that are is_completed=yes
In option 2 could you explain how I does the Job field is done in the task table.
I have been looking to do this initially. I thought there would be a field that automatically relates the task items to a job. Which is has been working great but it does this automatically. But when I try to filter only the tasks that belong to a job I can’t find a field to that links them.
From what you are saying I need to add this field, so do I add a field call associated_job and make job type but how does the job id get placed in there when i save the task?
If you create a field called associated_job that is a job type, whenever a task is created you’d set associated_job = job … selecting the job depends on how you have your page set up. Maybe it’s a parent group or the current page’s thing. But since Job ID is part of the job record, you don’t necessarily need to reference the ID specifically, just the job.
Finally got it to work the following way. Very non-intuitive. Notice the very small difference with the previous image above. (take out the first constraint is not needed it is not relevant)
Several hours on this little simple thing… I love Bubble, but this one was not fun.
@romanmg Gaby always willing to help so much. These are my own projects but when I get a client that wants to use Bubble, I am sure going to look for your professional help.