I am building a chat bot and using a gallery to display the conversation. I opted to use the flexible height gallery, so that the height of each text box is only as tall as it needs to be. However, the issue that I am running into is the gallery not scrolling to the default item.
When the user types in their question and clicks the SEND button, the user's question and the bot's response are stored in a local collection using the Collect() formula. Next, a context variable is updated with a unique id, UpdateContext({myGalleryPosition: Last(collectionName).UID}). Then, the gallery's default property is set to First(Filter(chat, UID = myGalleryPosition)). So, the default property is updated, however the gallery does not seem to select that record and scroll accordingly?
SIDE NOTE: If I follow this same process using a normal gallery, the gallery scrolls to the default record. however, when using a normal gallery, then the issue becomes dealing with the improperly sized gallery items due to fixed template size on all gallery items.
Does the default property work the same for a normal gallery as it does for a flexible height gallery? Is there a way to have the gallery scroll to the last item in the collection / gallery?
Your help is appreciated.
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional