# Building a sequential randomizer. Stuck

**URL:** <https://community.glideapps.com/t/building-a-sequential-randomizer-stuck/74342>\
**Category:** Ask for Help\
**Created:** [June 24, 2024, 6:41am UTC](https://community.glideapps.com/t/building-a-sequential-randomizer-stuck/74342 "2024-06-24T06:41:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HouseHippo](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@HouseHippo](https://community.glideapps.com/u/HouseHippo)\
**Post date:** [June 24, 2024, 6:41am UTC](https://community.glideapps.com/t/building-a-sequential-randomizer-stuck/74342/1 "2024-06-24T06:41:59Z")

</div>

Basically I have 5 columns with links (I used #'s in attachment for simplicity).

I want to sequentially rotate through each one on a button click. But only the checked value ones. Unchecked rows can’t be included.

So for this example, order should be: 1, 6, 16, 21, 2, 7, 17, 22, 3, 8, 18, 23… and so on. Click 1 goes to 1, Click 2 goes to 6, Click 3 goes to 16. Etc. Sequentially rotating to the next value after a click or condition occurs.

I’m in over my head and not sure how to do it. I’m also horrible with relation columns and arrays which I suspect this requires. Any ideas appreciated.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/a/ea45ae1ddf871162c4bc4d3c750d2975b733b235.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 24, 2024, 7:01am UTC](https://community.glideapps.com/t/building-a-sequential-randomizer-stuck/74342/2 "2024-06-24T07:01:56Z")

</div>

I think the trick here would be to coerce the whole lot into a single array in the correct order, and then you can simply step through that.

Just thinking out aloud:

- Create a Query column that matches all rows where CREATOR ADDED is checked.
- Take a Joined List of the Links Array column via that Query. That should give you one big long list of links.
- Pass that list to a JavaScript column to rearrange them, and return the correctly ordered list.
- Convert that back to an array with a Split Text column
- Go from there… probably Single Value with an increment action.

---

<div class="post-metadata">

**Author:** ![HouseHippo](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@HouseHippo](https://community.glideapps.com/u/HouseHippo)\
**Post date:** [June 24, 2024, 7:24am UTC](https://community.glideapps.com/t/building-a-sequential-randomizer-stuck/74342/3 "2024-06-24T07:24:05Z")

</div>

Thanks as always @Darren_Murphy.

That gets me a lot further than I was. At least I’m working vertically with checked rows only now via the query column (another weakpoint of mine). Will play around and see how close to end result I can get. May ping back if snags. Thx 🙏
