Hiding a thing based on things I have already seen

I have two data tables.

  1. A list of posts that I want users to read.
  2. A list of users.

In the list of users there is a list field that when the user clicks on to the next post, it adds that posts id to the user so we have a list of all the posts the user has read.

Here is the issue. I am trying to get it to only show the posts the user has not read yet. Now I have it set up so that this sorta works.

14%20AM 08%20AM

You can see how I have it filtered. What I am noticing is that bubble will still try to cycle through the posts and only hide the ones that the user has seen. This shows up as blank. I then have to refresh the page to get it to cycle past that post.

One more thing. I have safari controls hidden on this, it looks much better, so refreshing is not possible like this.

Does anyone know what I might be able to do to get this to skip all together the posts that are listed in that particular users record.

Perhaps you could share a bit more about the structure of this feed. Ie is it something like a social media app (where many users may see the same post) or more akin to shuffling through a list of flashcards and definitions? (Where you create that list of things specifically for the current user).

If the first scenario, you can set two fields up on the user: posts_unread and posts_read, where each of these is a list of things. On the feed, it is a repeating group of all of the current user’s posts_unread. When a post is created, it is added to the post_unread list of every relevant user. When the current user views it, you “remove” it from the posts_unread and add it to the posts_read. (Slightly optional, but more for records).

In the second scenario, on each item, you can have a flag called “user_read”, which is a yes / no value. All of these default to no when created. But when viewed, it changes to yes. And what you display to your user is a repeating group, which is based around the list_items, filtering out all already viewed values (ie. evaluated to “yes”).

These topics are covered in a bit more detail on Learn Bubble as well.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.