I’ve created a chat Bot that displays a list of messages to and from ChatGPT in a repeating group.
Every time the user asks a question that question and the answer to it are added to the list of messages, so the list gradually gets longer and longer as the conversation progresses,
The repeating group doesn’t have a fixed number of rows and the list of messages reaches the point when they go beyond the end of the repeating group and the user has to scroll down to see the messages (assuming they realise that they are there).
However, depending on the length of the messages, the user may not realise the need to scroll down. So, I would like the repeating group to automatically scroll to the last item/rows in the repeating group and just cannot figure out how to do it.
Yep, scroll to entry based on that repeating group’s :lastitem would be the simplest way.
Maybe check out this too:
It reverses the RG so the newest items appear at the bottom rather than the top, and you go back by scrolling up (like how most chat boxes work). So as long as the person is scrolled to the bottom, it will always show the newest item how you would expect.
It works by flipping the whole RG upside down, and then flipping each cell’s contents upside down so they appear right side up.
Sorry to be dim but I’m new to Bubble…where do I find the ability to “scroll to entry based on that repeating group’s :lastitem”
I already have the messages in the right order (as they are sorted on the creation date) so I have no need to reverse them. The latest is already at the bottom but isn’t visible as it’s beyond that botton border of the window.
Scroll to last item sounds ideal but I cannot find it for the life of me!
Depending where in the process you’ve got the step, it might be executing before the new item is appended (or at least before it realizes it’s there). You might need to make that action more explicitly run once the other stuff has happened.
Here is some order of operations info for Bubble if you haven’t seen it before.
I just wanted to say thank you for helping me resolve this. I also wanted to say what worked, in case anyone else has the same problem.
The workflow scroll to last action did the job but needed two other things to be true to make it work well.
First I needed to lift the last message off of the bottom by putting it a little bit of padding (or was it margin).
Second, ticking the “scroll animation” box on the workflow action really helped, as it seemed to force the scroll to the very last line of multi-line messages. Also, the animation makes it obvious to the user that something has happened with some visual feedback that wasn’t always obvious without the scroll.
So a bit thank you. My Chatbot factory is up and running.