5. View More Messages in a Conversation
When a Conversation contains more than 30 Messages, only the most recent 30 Messages will be initially loaded when the Current User clicks to view that Conversation on the messages page.
Since it's not yet possible to load Messages from the bottom of a repeating group, this template's workflows load the most recent 30 Messages in a Conversation, when a Conversation is first loaded (this decreases the time it takes to load the page). In order to view the older Messages, the Current User can scroll up within the Repeating Group Messages elements, and click any of the Group Show More Messages (Desktop)
, Group Show More Messages (Mobile)
, or Group Show More Messages (Existing Conversation)
elements:
Group Show More Messages (Desktop)
Group Show More Messages (Mobile)
Group Show More Messages (Existing Conversation)
(within the FG - Create New Conversation
element)
When any of those elements are clicked, the workflow changes the ":from item number" for their corresponding repeating groups, by subtracting 30 from the current ":from item number" custom state.
For example, if a Message contains 90 Messages, the most recent 30 Messages will be displayed initially. The data source would be SelectedConversation's Messages :fromitem 60.
After the Current User clicks the "Show More Messages" element once, 30 is subtracted from 60 (to show 30 more Messages), and the new :fromitem number is 30, changing the data source to be SelectedConversation'sMessages:fromitem 30. This causes the Repeating Group Messages (Desktop)
and Repeating Group Messages (Mobile)
elements to display Messages 30 through 90.
More information on these workflows can be found in the B. View Conversations and E. New Conversation workflow folders.
Last updated