Hi Bubblers!
I’m building an app where users are organized in groups. Each group will have access to a universal checklist that they can follow as a guide throughout the app.
Some tasks require the group organizer to complete while others require the entire group to complete individually (ex. Each users should update their profile, only the organizer has to complete inviting users to the group).
I have a good handle on how to assign each task dynamically based on user roles in the group, but I’m struggling on how to setup my data so that when a user completes a task, for that specific group, it is marked as complete. If a user is a part of multiple groups (which will be likely) the task should only be marked complete if the user completes it for that group.
How should I go about setting this up? I thought of creating an is specific to the user and the current group a user is viewing at the time (users can switch views between groups they are a part of). So if I’m viewing group “Apple” and my user id is ABC123, then my user group ID is “AppleABC123”. If I’m viewing group “Orange” then my user group ID IS “OrangeABC123”.
I’m thinking that I can create a field to record the user group ID in the task and use that to check whether or not the task should be marked as complete, but I’m not certain on how to do that and if it’s the best approach. Any help or food for thought is MUCH appreciated 
Bumping up because I’m really struggling on thinking of a better alternative
Hi there, @bridesquadapp… if I understand your post correctly, I’m not sure why you need the manually-created ID when you could link the data types together. I’m thinking you might have a field on the User
data type that is a list of groups to which the user belongs, and you would likely have a field at the task level that specifies the group to which a task belongs. I’m also guessing tasks are associated with users through the built-in Created By
field, so at that point, it seems like you should have the associations you need to show a specific set of tasks to a user based on the group the user is viewing at the time (i.e., a search for tasks created by the current user where the task’s group is the group the user is viewing).
Any of that make sense and seem like it could work for you? Apologies if I misunderstood your post and missed the mark here, but I hope that’s not the case, and I hope this helps.
Best…
Mike
Thanks for responding Mike. What you explained does make sense but I’m missing how I would share a universal set of tasks to all groups in the app.
The issue is that the task list I want all groups to access is created by me (App Admin). So these sets of tasks to not belong to a group per se, but is available for all to complete, per user, per group.
For example I would have a universal task list for all users in all groups:
- complete profile
- send first message in chat
For the latter task, I need to track completion of that task per user, per group. So if a user has sent a message in one group and not another, the task is marked complete accordingly.
Without some way to indicate which group the user has completed the task for, when a user completes a task it will show that it’s completed amongst all the groups they are apart of which would become confusing.
Based on the additional information you provided, here is what comes to mind. When a new group is created, you could use a backend workflow to create a set of tasks for that group (you can link the tasks to the group in a couple of ways) using the universal set of tasks as a template. Then, you could have a field on the Task
data type called something like completed by
, and that field would be a list of users. When a user completes a particular task, you add the user to that task’s completed by
list, and you use the list to know who has completed the task and who hasn’t. Think something like that could work for you?
Thanks! If that’s the best path forward then I will have to use the method you suggested. I would like to keep the list dynamic in case we add/update tasks on the universal task list though.
Well, I don’t know if it’s the best path forward because like all things Bubble, there are always a number of ways you can go. Maybe someone will come along with a better suggestion, but what I proposed is what came to mind for me based on the requirements you described.
1 Like
I’ll wait and see and also rethink if there are other approaches. Thanks!
1 Like