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
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?
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.
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?
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.
@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.
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.