Random link generator

Hi folks,

New to Glide but not new to no-code development. I’m trying to do something specific and am not sure what the best way to approach it is. Please help.

Goal: create a simple app for myself to read more and make it fun.

I have a Google Sheet with two columns: Column A: a list of 1000 linked articles i’ve saved over the years and Column B: a corresponding topic I assigned for each article (Business, Art & Culture, Economics, etc).

The goal: an app which allows me to pick a topic and click a button “Surprise me” and it links me to a random article with the appropriate topic assigned. If I want to reach something about business I pick “Business”, press the button, and it will randomly select an article from that list and take me to that page.

Here’s what I have so far but I don’t know how to make the “Choice” component and “Button” component talk to each other.

I’m starting to think Choice is not the right type of component for this job… Any help appreciated.

  1. One row helper table (build screen off this table)
  2. Choice component > user specific text column
  3. USC > Relation (multiple relation) > articles
  4. Single Value Column > via relation > Random > article link
  5. Button > shuffle action > open link action > single value column
1 Like

Hey Robert - thank you for taking the time to try to help. I’m realizing i’m not advanced enough yet to pick up what you’re putting down here.

What I think I understand:

  • You’re suggesting to create a new data table
  • The rows are user specific and will have a relation to the main table (with the links and topics in them)
  • The action of the button needs to have the shuffle built in

What I don’t understand

  • What are the rows of this table you suggested
  • What relations do they need to have for this to work
  • What do you mean when you say single value column
  • How many actions are needed for the button - just one

I think i’m realizing based on your answer that the solution resides in my better understanding the data side of Glide. Going to dive in there and then revisit your answers to see if it all makes more sense. Thanks!

The table will only ever contain one row.
It needs 3 columns:

  • a user specific text column, which will be the target of your choice component.
  • the multiple relation column
  • the single value column

Not the rows, the columns. See above.

The relation will match the selected category with the category in your Articles table.

It’s a Glide computed column type:

No, two.

  • The first action will be the Shuffle (this re-shuffles the Single Value)
  • The second action will be the Open Link

Like this:

Thank you @Robert_Petitto for the video - I followed your guidance and am so close! I have a suspicion it has something to do with what i’m writing to or how my data is organized. See video.

And thank you @Darren_Murphy for also jumping in here as well! Really feeling the support that this community has for new members.

Your screen needs to be pointing to the helper table, because the topic column in that table is the one you want to update when when you select your choice. Your screen is connected to the wrong table.

Figured that was wrong! So I changed it up but still running into issues. Sharing some screenshots.

Relations looks for matches. Topics do not equal Articles, so there is no match. Change your relation so Topic in The Helper table matches the Topic in the List table.

That did the trick! Thank you @Jeff_Hager.

Now I just need to figure out how to make it treat hyperlinked text the same as a URL. Alternatively will create a separate column with all the URLs.

Because some of the pages it opens is just giving me addresses like this: https://how%20many%20books%20does%20it%20take%20to%20make%20a%20place%20feel%20like%20home/?There%E2%80%99s%20a%20reason%20that%20some%20people%20won%E2%80%99t%20let%20go%20of%20their%20physical%20books%20%E2%80%94%20and%20a%20new%20term%20for%20it:%20%E2%80%98book-wrapt.%E2%80%99By%20JULIE%20LASKY

instead of this: How Many Books Does It Take to Make a Place Feel Like Home? - The New York Times

What you see in the data editor is literally what Glide can see. If your article column in your google sheet is only showing a page title, then that is all that glide is going to see. If it’s showing a url, then glide will see a url. It won’t see the underlying url that stays within the google sheet. If you want both url links and titles, then you are going to have to do something in your google sheet so both are visible as separate columns. One column that only contains page titles, and another column that only contains urls.


This article helped with this aspect of it - Extract URLs from Google Sheets

Thank you all for your collective help @Robert_Petitto , Darren_Murphy and @Jeff_Hager :clap:

Not sure which response to mention as the solution since all of them played a part.