Random Label Link to List

I'm trying to use a list to select a link that corresponds to a randomly chosen picture (label). Pictures are named from 1 to 12 e.g. P1.jpg.

Originally I used if else statements with the specified Label Name (hidden in screen view and corresponds to the picture) and the link that relates to it.

I need to make it more concise, I was told that if I put the URI values into a list I can select the right one via the list index.

I understand each one would be index 1 to 12, but I can't figure out how to relate it to the label which will have the text as P?.jpg. I've tried a few different ways and gotten close but I've hit a wall and can't wrap my brain around it.

Any hints or help would be appreciated.

I got it! Thanks to this tutorial https://www.youtube.com/watch?v=r9oXr-S2NbA

There was no need for a second list of jpg file names, because you chose a useful naming convention.

To convert a jpg file name back to an index number (1-13), run it through two test REPLACE blocks, one to replace the 'P' with empty text, and the other to replace the '.jpg' to empty text.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.