Messaging System Question

Hi @Adam2016,

You want to use a custom state for both the user selection and cell color change. The workflow would look something like:

“when user name [text in cell] is clicked > set state”

When you set a state you choose an element to “hold” or “store” the state. It can be any element on the page, really, but make it something logical to stay organized, like the repeating group of users.

Then the state type will be users since we’re wanting to make a selection of users for the next action (starting a message thread with them). And this state is a list type so it will expect more than one user. I’m assuming that’s the functionality you want here; otherwise, a single user type would be used to do this for 1 user at a time.

Then set the value of the custom state as “element’s custom state :plus item additional user”, which means you’re adding a new user to the existing list of selected users every time you click on a new one. If you’re clicking on the first user for the list, this expression will still apply since 0 + 1 = 1.

Now, users will be added to this custom state list, which you could then use in a workflow. So if the “start new thread” button is supposed to create a new thread Thing in your database, I’d assume that that Thing has a field to store the users (type user, list) involved. When you create, that user field = repeating group’s custom state.

The cell color is a condition off of this state. Add a shape to your cell that by default is transparent or just not visible. Then add a condition to the shape: when repeating group’s custom state contains current cell’s user > shape is visible or shape’s color changes.

I actually wrote a newsletter all about custom states and provided a very, very similar example (select multiple users from a repeating group to delete) which can be applied here and in many other cases (like messaging inboxes). I also did a style condition as well, where the color of the name changed when selected. My newsletters are free, and you have access to the archive once you sign up (link below). I hope this helped!


Gaby | Coaching Bubble

1 Like