Changing the icon only, then updating it back

Hello, Everyone has been so helpful here!

I’ve created a List of Lists and a Users List (each have their own database)

The user can click a button to show the List of List items with a name and checkbox property. When they click the checkbox, it adds the item to their personal list. This has worked very well.

But there is no visual to signify that it’s been checked and added. This is what I need.

I’d like to make the checkbox icon change to a checkmark, then when they leave the screen, automatic change back to a checkbox so it’s fresh if they need to use it again.

I’ve been unable to find where to change the icon only.

I tried adding a True/False to the List of Lists, and my plan was to add an action to the back button to update them all to false when the user goes back to their own list, but there was no option to do this on the Update actions.

Any ideas?

Thank you all!

Question about the “Personal Lists”: If the user needs to add an item from the “List Item” list again, does it no longer exist on their "Personal List? Or, will they potentially be adding that “List Item” to their “Personal List” multiple times (meaning they could add 2 or more instances of a “List Item” to their “Personal List”?

They are able to delete items off their personal list. In that case, they could go to the list of list and add it back. Also, the way it’s configured (I don’t have a workaround) is that every time they click on an item on List of Lists, it adds to the personal list, so yes, there could be multiple entries of the same item added to the personal list. If this happens, they are able to delete the duplicates, but I don’t have a fix for this part.

OK, great. I think there’s probably 2 ways to do this. One easy & quick, and one a little fancier and more difficult.

Both ways work by filtering (either the list or visibility of list components) by wheter or not an item is on the user’s list.

The easy way would be to simply apply a filter to your “List Items” List so it will not show items that are currently on the user’s personal list. The filter would likely look like:

Sometimes Visible
Will Be Visible If…> Current List Item’s > Users > All
Does Not Contain
Current User

The harder but more nifty way would be to use the visibility options on your list components - you’d set an empty checkbox icon to be visible only if the current list item is NOT on the current user’s list, and the checked checkbox icon to be visible when the current list item IS on the current user’s list. This method also still allows all the list items to be visible while your user is selecting items, so they can see what’s in or out of their “personal list” right from the list items list.

Both of these options are assuming you are using a relationship field to link “Users” to “List Items” to establish the “Personal List”.

Thank you for your help. I’m trying what you suggested. I’ve attempted both and the current issue is I can enter:

Sometimes Visible
Will be visible if - logged in user > Personal List
Does not contain
________((Here’s the issue)) There’s “List of List” but no option to choose “name”, it just goes opens box after box

I’ve also tried a filter but get the same - the selection never gives me the option to choose List of List name.

Could this be a database setup issue?

Appreciate your help!

Could you clarify your database setup?

It sounds like you have 2 collections:

  1. “Users”

  2. “List of List”

The naming convention is throwing me off. is “List of List” a collection of your list items?

I had made an assumption that you have these 2 collections, and then you have a many-many relationship between “Users” and “List of List”. This relationship is what would essentially “create” the user’s “Personal List”. There shouldn’t (I don’t think) be a 3rd collection of “Personal List”.

The filtering menus can be a bit confusing, especially when they go down that infinite sub-layer route. It took me a while to figure out the mechanics of how it works, but once you get the hang of it it gets a little better. Let me know about your database and how it’s set up, and I might be able to walk you though setting up the filter a little better.

Thank you. Yes, my apologies for the name swap. There are three databases.

  1. User:
    Relationship Personal Items (one user to multiple Personal Items List),
    Relationship List of List (one user to multiple List of List),

  2. Personal Items List:
    Relationship User (one user to multiple Personal Items List),
    Relationship with List of Lists (many to many)

  3. List of List:
    Relationship User (one user to multiple List of List),
    Relationship with Personal Items List (many to many)

I made List of Lists separate because I wanted to prevent the User from deleting the items on the main list (List of Lists) but allow them to delete on their personal list and add back later if they want from the List of Lists.

With both list 2 and 3, I’ve tried making the relationship with the Users database many to many, and one to many, but this doesn’t seem to change the neverending sub-layers.

I think you might want to try to eliminate the “personal list items” collection. It creates redundant data and I think it’s unnecessary for what you are trying to accomplish.

Don’t worry - your users will only be able to delete what you let them delete! :wink:

I’m pretty sure you should simply have your “Users” collection, then a “List Items” collection (I’m sorry but the “list of list” name for that collection is confusing and bugs me).

Then, create a Many-to-Many relationship between “Users” and “List Items” This will serve to identify items that users have placed on their personal lists. I like to rename both ends of the relationship so it’s easier to identify when setting up logic/functionality in your app. In the “List Items” collection, you could name the relationship field “On User’s Personal Lists”. In the “Users” collection, you could name the relationship “Personal List Items”.

To control what is on or not on a user’s Personal List, you can use a toggle component within your LIST of “List Items”. A toggle can be mapped to control the addition and/or removal of the logged in user to the relationship field. Check the box, and BOOM, your user now has that item on their personal list. Uncheck the box and BOOM, your user has removed the item from their personal list. In both cases, the checkbox will automatically show as checked or unchecked depending on that relationship status.

To display a user’s “Personal List”, you create a LIST of “List Items”. Then, add a filter:

“On User’s Personal List”
Logged in User

This shows only the items they’ve put on their personal list. The checkboxes in this list will automatically show up as checked since they’re mapped to the relationship field. Best part is your user can uncheck the box to remove the liist item from their personal list and POOF it will disappear from this list.

Another fun thing is you can show a LIST of only items that are NOT currently on the user’s Personal List, by applying this filter:

“On User’s Personal List”
Does Not Contain
Logged in User

In this list the checkboxes will automatically show up as empty since the users don’t have the items on their personal list. But, if they tap the checkbox, it will add the item to their personal list and POOF, it will disappear from this “LIST of items that are not on their personal list”

This is powerful functionality because using the same concept, you can show all kinds of data configurations with list filters. For instance, you could show a list of users that have a certain list item added to their personal list. Or, if you add a more complicated filter, you can show a list of items that are added to the personal lists of users who also have another specific item added to their list. The relationship part of relational databases is immensely powerful.

Hope this helps!

Keep in mind, your users are only ever interacting with the relationship field in this setup. Your List Items" data will be safe and won’t be able to be deleted by the user.

Hope that helps!

1 Like

Wow, this was perfect! Thank you SO much.

One last question, if I may, if the user wanted to add an item to their Personal list, that would only show on their personal list, how would I set this up?

I made an input and button component, but when I try to add action to create an item on the Personal list, there’s no option of only logged-in user, therefore it creates an item on the universal List.

You don’t want your users to create a “Personal List Item”. You want your users to create a “List Item” that only they can see.

You just need to add another field to your “List Item” collection, which will be another relationship to “Users”. You can set this up as a Many-to-One (one user can have many List Items, but a list item can only have one user). When you set up the screen or modal for “creating a list item”, you can put another toggle labeled “Private” or something like that. Set up that toggle to add the user to the “private list item” relationship field the same way as you have them toggle to put a “List Item” on their personal list.

THEN, you have to up your filtering game on your lists, and add an OR filter to show your users “List Items” that are on their personal list OR List items that are on their personal list AND that have “current user” in the 2nd relationship field.

This is a quick and vague reply, I know, but give making a 2nd relationship between “Users” and “List Items” it a shot. I’m out of time at the moment, but later tonight I can write up a better, more thorough answer if you’re still having trouble.

1 Like

I’m going to try this. I’ll update you tomorrow. Thank you!

Hello again, Thank you! I’ve worked on this and you’ve been so helpful. I’ve almost got it working perfectly thanks to tbtilton!

Current issue: marking the items as done is updating all users, not just logged-in users.

Here’s the setup:

Database: Users

Database: List


Done (true/false)

Relationship M:M “On User’s Personal List” - this moves items from suggestion to the user’s personal list

Relationship 1:M “Personal List” - this moves items from input to the user’s personal list

Private (true/false) - tags the input item, so it only adds it to the current user.

The user can click suggestions and mark which they want on their personal list. They can also add their own to only their personal list from the input bar.

So far so good.

But when a user moves an item from the suggested list to their Personal User List and marks it as Done - it updates this for all users, not just current user.

I’ve tried to adjust the toggle, and a few other things, but all were unsuccessful. Toggle only gives a few options. Here’s a screenshot:

I’m missing something. Would you have any suggestions?

Sure. This is happening because the “Done” field belongs to your “List Item” Therefore, it it is marked done by anyone, it will show up as done for everyone. What you need to do, is rather than having “done” be an attribute of the List Item, make it ANOTHER relationship to the user.

Then, have your toggle control that relationship the same way you control whether or not an item is on someone’s personal list.

Here’s the kicker though - when you set up the actions on your controls, make sure you are clearing the “Done” relationship whenever the user clears the item from appearing on their personal list - otherwise, the next time they add the item to their personal list, it will already show up as done.

I was just thinking, too, IF you start to want to have more robust control over each instance of something being put on someone’s “personal list”, you could go back to having a separate collection of “personal list items”. BUT, that collection would pretty much only be a collection of relationships - you wouldn’t replicate the meat of the data from “users” or “list Items”.

As you start to really grasp how the relationships are working between your collections, you’ll know what I mean. It’s certainly not necessary to add a collection for your current use, but as you get better and as your app gets more complicated, just keep in mind it’s a possibility.

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