User profile: select category from a list

Hello!

How can I allow user to select the category of articles they want to review. There are 10 different categories of articles available. I would like to display all 10 and let the user select the categories of interest. For each category selected, I need to create a row in the user profile sheet:
signedin_emailA, category1
signedin_emailA, category2
signedin_emailA, category3
signedin_emailB, category1

Thanks!
Benoit

Would this be done when they “create” their user profiles, or are you trying to implement a different flow?

When creating their profile

Would this work with a checkbox style that writes to 10 different columns in your profile sheet boolean values, then you display to users the articles based on those values?

Have you tried the favorite feature yet? I think it might fit your requirements. Select favorite means that you have seen it.

This app should give you ideas: https://substackgems.glideapp.io/

1 Like

I would probably create a column for each category in a user profile sheet to hold a value from a choice component (up to 10 choice components). Each column would be set up as an array (Category 1, Category 2, Category 3, etc.) to create an array column of Category. You could use the category array column for a relation to the related articles.

You could do this with checkboxes too if you created 10 checkboxes and filled 10 checkbox columns in the sheet for each user profile record. You would have to use arrayformulas in the sheet to fill in the corresponding category array column based on if the checkbox is checked or not. Then you can do the relation as explained in my first idea.

A final idea is to create another sheet that lists the categories. In the glide data editor, create a user specific checkbox column. Display the category is as an inline list in the checklist layout. The user can select any categories they want from the checklist. On the articles sheet, create a template column and fill it with the value from the category column in the article and the value of ‘true’. Create the same template in the categories sheet, but instead join the category name to the checkbox value. Use this template to create a relation in the articles sheet to the template in the categories sheet. Now wherever you display your list of articles, filter if the relation is not empty. It should only show articles the user selected. This would by my preferred method of the three.

2 Likes

Thanks Jeff. I have tried the option to add 10 columns but could not finalize the link between articles and user profile. Can you help me finalize this?

Which of the 3 methods are you using? What do you have so far? Do you have any screenshots describing where you are stuck?

Thanks @Jeff_Hager , your support is much appreciated.

Could I make you a member of the app org?
Here are screenshots of the data model and outcome.

Tab with content: each row describes one article with a URL for picture. I have tried different ways to categorize the article:

  1. Column Category of topics, this is what I currently use to sort content matching user preference
  2. Separate row for each of the category with boolean value as per your recommendation

Tab with user profile and topics of interest. Again here trying two approaches:

  1. Column Topics and Topics relation. this is what I currently use to sort content matching user preference
  2. Separate row for each of the category with boolean value as per your recommendation

@Jeff_Hager
Outcome:
My content = articles filtered for topics matching the user profile

If you have something that works, then great. Honestly I would approach it with the last option I provided. It’s the most scale-able in the long term if you add more categories. Otherwise you are stuck with adding more columns and having to edit the app each time. Each user can select the categories they want based off of the single list of categories to choose from. Their selections are saved in the user specific checkbox column and the relations will work dynamically based on who is signed in.

1 Like

@Jeff_Hager your method is really elegant and is super helpful to scale it.

It’s near-perfect for my used case.

However, to take the above example, is there a way (as an admin) to have overview/control over the ‘subscription’ a user chooses, at least know who has a subscription to which topics? Best case would be to have an approval process before the user gets to see the articles pertaining to the topics she chose.

Thanks a tonne in advance!

The only way if you use user-specific columns is to preview the app in your editor as that user. If you need to approve things then add a further “Approved?” column in the profile that only an admin can tick, then set the condition for articles tab to only show when user’s “Approved?” value is True.

Thanks @ThinhDinh, however won’t that mean you are actually ‘approving’ the user, and not the specific categories which she has opted to see? I want to achieve the latter …

If you want to approve the specific categories one by one you need to have a form to catch each one as a new row I’m afraid.

As you are able to edit the user-specific choices inside the editor, you can email the user if there are some categories you think they can’t see, if you still want to go with the initial flow.

2 Likes