Update a Thing when displayed inside a Repeating Group

Hi,

I’m building a client support messaging feature inside my app. One of the feature is to update the status of a message (from 'waiting’ to ‘read’) when it is displayed on the recipient screen.

For example:

1- both client and support are online and the messages of the conversation are currently displayed on both screens with repeating groups.

2- The client sends its question to the support. The newly created message is in 'waiting’ state. A workflow create the message Thing in the database and links it to its belonging client Thing.

3- Then the new message is displayed on the support’s screen inside a repeating group.

4- The message’s state should then be updated to ‘read’ as soon as the repeating group displays it.

So the question is: how can the repeating group update the state of the new message? How do I know that the message has been fetched and displayed in order to change its state?

Create an event “Do when condition is true” and have it trigger when an element is visible. Add a little shape or anything to only display in the top chat by making it only visible when current items index = current repeating groups count. You can add other filters to the workflow to make sure it only triggers once per message such as adding current state is count and not triggering if current state = count or something similar