Automating Category Selection in Task Management App

Hello Glide Community,

I’m developing a task management application structured around categories and sub-categories. When creating a task, users can either select an existing category from a choice component or create a new one. Is it possible for a newly created category to be automatically selected in the choice component immediately after it’s created?

Similarly, when I create a sub-category, I want it to be directly linked to the category selected in the task form. This would eliminate the need to re-select the corresponding category, reducing the risk of errors and redundancy.

I’m attaching two screenshots to better illustrate the issue.

Thanks in advance for your insights!

I think I tried it in the past but it didn’t work back then, I was using a default value tied to a User Profiles column, and set the newly added “category” to that column. It didn’t update until I close the form and open it again.

For this use case, I think a custom form works best, because you can set the new category directly to where you’re storing the choice.

Similarly, this can be achieved using a custom form.

1 Like

Thank you for your response!

I’ve tried to find solutions using custom forms, and even with help from Robert Petitto’s video (https://www.youtube.com/watch?v=Dr1pCuL2Mg0), I’m still struggling to implement this.

The issue I’m facing is that when I create new categories, the information is only recorded in my categories table and not directly in my tasks table (I have several distinct tables).

As a result, while the new category is correctly saved in the categories table, I’m unable to retrieve any information from my tasks table because no data is transferred before submitting the tasks form.

Perhaps my table logic is flawed, but despite spending many hours searching on forums and the internet, I still haven’t found a solution.

I’m open to any suggestions or advice, thank you.

So what you’re showing us in the original post is a task form? I’m not sure what you mean by “no data is transferred before submitting the tasks form”. Can you elaborate?

Yes, that’s correct.

It is possible to add tasks associated with categories, which in turn have specific sub-categories.

To explain it a bit more: I have two distinct jobs and the goal is to use this application for both personal needs (with private data) and professional needs (data shared based on the user’s role, either “Work1” or “Work2”).

  • (myself): Access to my personal data (medical appointments, restaurant reservations, etc.), tasks related to Work1 (calls to graphic designers, emails to clients, etc.), and tasks related to Work2.
  • Jess (Work1 collaborator): Can see her personal data and tasks related to Work1, just like me.
  • Alex (Work1 collaborator): Same logic as Jess.
  • Marc (Work2 collaborator): Sees his personal data and tasks from Work2.

I’ve opted for the use of Row Owner columns to avoid downloading irrelevant data in the backend. I have configured four distinct tables:
(the blue background is what is configure in Row Owner)

User Table:

Category Table:

Sub-Category Table:

Tasks Table:

When a user wants to create a task, they use a form where they can enter a description and select an existing category or create a new one. If a new category is created, I would like it to be automatically preselected for the current task (which I tried to do by using a temporary “usc” column in the users table).

Sub-categories only become visible when the corresponding category is selected, which I plan to manage with conditions. However, the newly created sub-category must be within the same category (hence why I want to retrieve the category value using the “usc” column).

After successfully setting this up for the users and categories table, I noticed that when switching users, I could no longer access certain data for the sub-categories table despite a configuration identical to the categories table. (the grayed columns should be visible to some users, and vice versa).

I’m a bit lost in setting up this structure, and I can no longer make progress despite numerous searches on forums. It probably comes from poor management of Row Owners. Any advice or suggestions would be greatly appreciated to help resolve these issues.

1 Like

Thanks for the very detailed explanation. I think it stems from the Users table. Amongst those “row owner” columns, which one is setup as your “role” column?

Thank you for your feedback.

The “Role” column in my user table is indeed set as the role column because I’m an admin and need access to both Work1 and Work2 roles. (You will find an exemple below).

I came across this video which explains how to configure roles starting from the 19th minute: Role Configuration Video.

I followed the same steps, and now it seems to partially work (I had too many columns set as Row Owners across my tables).

Here’s the current setup summary:

Now, I cannot access sub-categories created by my colleagues because their role is noted as Work1 or Work2 and not as “Admin”. However, it works for other users; they see what they should see. This suggests that it works for the categories table because the default role assigned is “Admin” (I created the category myself).

I feel like I’m close to solving this, but there are still some adjustments and tests to be made. Any further insights or suggestions would be greatly appreciated.

You still need to do some cleanup. Your user table should have a Role. The other tables should not have a Role. The role column in the user table is what’s used for configuring the role in the user profile configuration. Do not set the role column as a row owner column. It just makes things more confusing.

Email addresses and user Roles are two things that will be acceptable in a row owner column. In each table, create the necessary number of Rows Owner columns that contain either the email address or role of the user you want to have access to that row.

If the Admin needs to have access to every row, then there needs to be a column designated as a row owner column that has ‘Admin’ in every row. If users with a Work1 role need access to certain rows, then there needs to be a row owner column that contains ‘Work1’. So you could have three or more row owner columns. One with email address for a specific user, one with ‘Work1’ for a group of users in the Work1 group, and one for Admin.

Remove row owners from the Role column. It’s just granting a user access to themselves. You already have the Admin column to give any Admin Role access to any user row that has the word ‘Admin’ in the Admin column.

Is it working? You are viewing as Marc, who is an Work2 Role, so you see anything where the category is Work2 or the email is Marc’s email. There is nothing granting Admin access.

Now you are viewing as John. John is an Admin Role. Not a Work2 Role. He only see rows with his email address.

3 Likes

Hello,

Thank you for your valuable advice.
After considering your suggestions, I have successfully streamlined the user table and properly configured the Row Owner columns based on roles and access. Here is the current configuration to confirm that I have understood correctly:

  • User Table: The columns Access_Work1, Access_Work2, and Access_Admin now contain labels for users authorized and are set up as Row Owners. This ensures that users only access data relevant to their roles. (see screenshot below)

  • Categories and Access: Work smoothly

    • Tasks under “Work 1” are accessible by John, Jess, and Alex.
    • Tasks under “Work 2” are accessible by John and Marc.
    • Any other tasks created in different categories are private by default.

However, I am encountering an issue with the sub-categories table. Despite the configuration seeming functional for everyone, John (Admin) cannot see the data under “Work 1” and “Work 2”. I am somewhat lost regarding the necessary logic for the admin to access these data, as I assign “Admin” to these two values.

The current setup seems logical, but there is clearly a detail I am missing for the admin to correctly view data from both work categories. I would be very grateful if you could offer a proposal or correct me if I have misinterpreted any part of the process.

After a rapid control I think it is when I create a subcategories with another user than John. As the User ID is not mine, I can’t see the new sub-categories.

Thank you in advance for your help and suggestions.

You need to make the Admin column a Row Owner.

3 Likes

Yeah…under your current setup, John has a role of Admin. He can only see rows with row owner columns that contain either his email address or his role of ‘Admin’. He does not possess a Work 1 or Work 2 Role. Only an Admin role. Your subcategory table does not contain any row owner columns with the word ‘Admin’.

Mimic what you did in your User table with the Access Control columns. I think you need the same thing in the other tables. Category is fine as a row owner column, but you also want to give access control to the admin as well. Probably in both the Category and Subcategory tables.

2 Likes

Thank you both for your insights.

Indeed, I have initially set up the “Access_Admin” column in the user table to include “Admin” for the roles that interest me, such as Jess and Alex under “Work 1” and Marc under “Work 2”. This allows me administrative access to the relevant data. However, I’ve encountered an issue with the implementation of this system in the sub-category table.

When a user creates a new sub-category, the new sub-category row automatically inherits the “Admin” role, granting me access to all of their data, including private ones. Ideally, I would prefer that other categories they create themselves remain private by default.

I also tried reversing the setup by leaving only my account, John, as an Admin. This approach seemed more logical to me, but it led to another issue: if someone else creates a sub-category linked to a category, there wouldn’t be an “Admin” in the Row Owner column, and consequently, I would not have access to it.

Let me know if anything is unclear