Workaround for filtering a table based on connected user records

I have a messages table and message reads table. Messages connect to multiple users and each message read connects to one user. Messages connect to multiple message reads. When a message is sent to users, each user has to mark the message read which inserts a new “message read” connected to the message. I can show a table/list of message reads connected to the logged in user, but I cannot do the opposite which is show unread messages for that logged in user.

I created a message send table which connects to the message and users but it does not create a message send for each user, it only creates one message send connected to all users the message was sent to.

I have to be able to show unread messages and read messages in separate lists. Is there a way to do this?

Hi Angie,

you could make it so that when you send the message it creates a ‘message read’ for each user with a status field of Unread / Read (default: Unread). Then each user updates theirs to Read once they have read it.
This would enable you to have a list of all unread messages (by message or by user) and a list of all read messages. Would that work?

Hugo

I had tried that as “insert a connected record” when a message is added and it created one record instead of a record for each user. Possibly because it has a many > many connection? I couldn’t figure out how to do it so it creates a record for each user upon adding a message. Is there another way to achieve this and have it create one for each user it is connected to?

Hi Angie,

If it were me I’d use Make.com for this. It is great for exactly things like this that Knack can’t quite do by itself, as well as other integrations. Happy to help you set it up if needed / interested. And it’s very cheap too (typically about $10 per month, and depending on volume you may get away with the free version for this use case).

Hugo

Thanks for you help! I do have Zapier currently. Do you prefer Make over Zapier?

Hi Angie, on a similar subject - Im creating a message system in Knack for users - how do you let a user know there is a message waiting to be read or actioned? I was trying to see if I can change the colour of a tab button or somesuch …

Make, every time!

I used to use Zapier but found it too expensive, and Make worked better with Knack. But if the volume is low and you are already good with Zapier then stick with it!

I got this to work with Zapier for now and will definitely check out Make as an alternative for the future. Thanks again for your assistance with this.

1 Like

I created a dashboard page now with the help of Zapier integration to be able to display both unread and read messages in separate tables. I have not done anything to indicate something new is waiting other than their view of unread messages at the top of the dashboard page.