Reorder buttons alphabetically

I have a group of buttons who’s text can change based on external data. It would be great if the group of buttons could reorder themselves alphabetically based on the text in the button. Has anybody ever had experience doing such a thing?

Why don’t you order the data first and then set the titles in the correct order on the fixed in place buttons

Here is two examples.

The Buttons do not move but the titles are ordered.

Example 1, Sorts the external data and then applies it to the buttons.
SortButtons1.hype.zip (25.6 KB)

Example 2, takes the current Button titles into an array, sorts the array and re applies to the buttons.

SortButtons2.hype.zip (17.0 KB)

It would be a good idea for you to post your hype doc so we can see it’s workings to give a better answer.

2 Likes