There's got to be a better way for this!

So you have a Task’s database, where new tasks are being generated constantly, and each task is assigned to multiple users, and they all have to complete the task individually, and you want to keep track for each task who completed it and who didn’t.

How would you do that?

(If i have a yes/no field called “Completed” on the Task database, and one completes it, the task will switch to “yes” for everyone).

(And i dont want to keep only “number” of completes, i want to keep actually who did and who didnt.)

1 Like

I would have 3 types of things: Tasks, Assignment, and User.

Task would have the task content and a list of Assignments
Assignment includes a field for Task, a yes/no for isDoneYet, and a field for User
User has a list of Tasks.

That way, the original task content is not updated, and you can check to see if each individual user has completed the assigned task without messing with other people’s stuff.

2 Likes

Neat!

While i was on it, i thought about a different way, let me know what you think:

There would be a field on each task called “Complete?”, and instead of making it a yes/no field, i wold make it as a “User” field and “as a list”, when an assigned user hits complete, his name will be added to the “Complete?” list.

One of those 2 ways is probably more efficient in terms of programming hassle, computer performance, gotta figure out which one

You could also have two Users lists in the Task thing, one for Users assigned to the task, one for Users who completed it. A list like this can contain up to 10 000 things.

yep that’s what i wrote after

question is which one is more time consuming

Since Bubble is made for ease of development rather than for optimal performance I don’t thinks it’s a big issue.

Personally, I would go with the three-types solution. From the perspective of a logical model of what is happening, it more clearly represents the relationships. They are really out in the open with the Assignment type.

In the assignment item, you will have the isDone element that relates only to the assignment of the task to the person. It clearly means this Task has been done by this Person.

This also allows you to easily see a complete list of assignments by person. Just start at the person and list all assignments in the person’s assignments list.

(pardon me for changing the terminology, e.g. user vs person, but it’s more natural for me and I believe you’ll get the point.)

@philledille 's comment is interesting. If you need maximum performance, you will have to give up ease of development. I have 30+ years experience in software development, with a 10-year layoff to develop another business. I am virtually brand new to Bubble. As far as I can see, as was true with BAL (basic assembler language) on IBM mainframes of the 60’s, at the outset, you will do better to focus on meaningful abstraction and expression of the real-world situation rather than getting caught up in trying to make the program efficient at the expense of clearly expressing the real-world problem.
How’s that for a run-on sentence? :wink:

I hope that didn’t get too esoteric for this discussion. :slight_smile:

I always optimize for delivering value to users as quickly as possible. Figure out if you have something useful, then optimize when necessary. As Peter Drucker said, “There is nothing so useless as doing efficiently that which should not be done at all.”

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.