I think I’m doing that part correctly. But please let me know if I’ve made a mistake.
I would like the categories updated in the “Evidence” column in the “Categories” collection to be as a reference for the horizontal chip list on my home screen as shown below:
Reg. your 3rd question: “category index” with text field approach will not work, unfortunately. As far as I understood from your post, one item can have many categories. So rebuilding all the text search index field will be cumbersome.
You can create “All” category and have it added to each item.
Then create a relationship “User” - “Selected category” (one category can have many users, but user can have only one selected category).
Then set up the chip list click action in a way, that it updates this User-Category relationship for logged in user and current category (one in the chip list).
And then you can filter out the “Main” list based on the user’s selected category.
Because I’m using the horizontal chip list as a filter on my Home Screen, there isn’t an ability to (and wouldn’t be the case if the user is just logging in) to have the contextualized category selected (i.e., there isn’t a “current category”).
This is what is shown as options for filtering the Categories on my Home Screen:
This is great. Thanks, @Victor. I think the part that I’m struggling with is automatically adding the “All” category when the user selects the categories in the multi-select dropdown. I also played around with this a little and tried to add a Click Action for when the user adds the details to an Item (in this case it’s Evidence) but it hasn’t worked out.
This is what the screen looks like for adding Categories to Evidence (the item):
Yes, you are correct, my bad, my suggestion using current category > evidence should be said to be on the list below, evidence collection list.
For adding “All” category, you can save this relationship property in logged in user too (use as any other temporary variable, but this time it is relationship property), when is that, when user sign up, and updated when user login.
It is actually just an initialization variable, and then you can use it at multi-select dropdown action, just copy from logged in user to evidence collection.
But @Victor might be the better person to suggest the answer.
In my horizontal chip list I have set up an action to Update Logged in User > TMPSelectedCategory and that column is populated with the CategoryName from Category selected:
You need to add relationship property with 1-to-many, not many-to-many,
the way I would do is, open category collection in editor and add relation to users and choose option #1, at the top, it means 1 user can have multiple category.
Sorry for my miscommunication, not telling that this should be 1-to-m.
I think my mistake is here, it should be the other way around, sorry, because I didn’t put it in editor.
Mistake #2, I didn’t realize that it needs app setting collection to store all category, and also need interim screen to initialize all category into tmpselectedcategory.
You also need to call this interim screen (initialize…) at the sign up or login by change input value for need update to YES
Here is the cloneable app,
And when you add new evidence, you can initialize all category, it is a many-to-many, so use update and add category from app setting.