Showing a list item name based on which item is selected

Hi there,

I have a problem, I want to specify the category name based on which category was selected from the list, but can’t find a way how to do that how I want.

In my app I have Home screen where is “button” with category name and list of items which are filtered by selected category. The button provides from which category items are showing and also when user clicks this button he can go to categories screen and select other category and get new list items in the home screen.

My problem is that when user login to app this “button” do not show any name, but you can click the button select category and now the name appears.

When user login:
Screenshot 2023-02-17 at 03.06.17

After button pressed and category selected from the list.
Screenshot 2023-02-17 at 03.06.31

Now everything in my app works like this:

  • I have collection “Categories” with properties: “Category_ID”, “Category_Name”, “Selected” parameter which are boolean.
  • When user selects category in Categories screen, I link user to Home screen and update “Selected” parameter to TRUE.
  • In Home screen I made a “button” as a list of Categories collection and filter items if “Selected” parameter is TRUE
  • When user wants to change category he clicks button and I link him to Categories screen and update “Selected” parameter to False.

I need to make it so that when the user logs in to the app, they see the last selected category and list item. And then he could change the category if they wanted to. Any ideas how I could achieve this?

Add a one-to-many relationship between users and categories where a user can have 1 category and a category can have many users. When a category is selected, update the logged in user’s category parameter. You can tjem filter the list where categories users contains logged in user.

Hi Flawless!

Could you clarify your answer? I created relationships between users and categories where a user can have 1 category and a category can have many users. But what exactly I should update? I see this but do not know what I should select:

Update > logged in user (NOT logged in user > category)

Category parameter > Current category.

Seems works, thanks for the help!!!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.