Forum Documentation Showcase Pricing Learn more

In a repeating group, how can I access the previous cell's object?

I am implementing messaging between users with the user’s profile image and the text in the cell. I would like to hide the profile image in a cell if the same user is the creator of the previous message. Is there a way to reference the object of the previous cell in a repeating group? So far, I’m only able to access “Current cell’s number” and I can’t subtract from this value as input for “item #”.

Right, our expression editor doesn’t let you do this, but you should to create a custom state on an element in the cell that does the calculation (or a hidden input). A bit hacky, but until we have an overhaul of our expression editor, that will do it.

1 Like

Thank you; I’ll give that a shot.

I’ve created a custom event on an input (or group) that stores the previous cell’s index and then stores the previous cell’s message. The issue I’m having with this route is how to trigger this custom event once the message object has been set for the cell. Right now, it only executes the custom event on input change (or group click).

Right, so a hidden input is prob the way to go. bc then no event is needed.