Random answers by chat bot

Hmm, another way to do it would be to store your bot responses in a repeater column, with the response numbers (e.g. 1, 2, 3) in another column. You could then have your button generate a random number, store it in a variable, and then refresh the repeater that contains your bot messages. OnItemLoad of that repeater, you can use a condition to check whether the randomly generated variable value matches the row number of one of your repeater rows, and if true, then that repeater adds the message from that matching row to the repeater that contains your chat message.

Here’s an example of the expression that would generate a random number between 1 and 3, for a repeater that has 3 bot responses (3 rows):

I’ve attached the sample file that allows you to add a random bot response to your existing repeater. Hopefully this helps!Random Response with Repeater and Math.Random().rp (57.5 KB)