Randomness workflow
TD

Thinh Dinh

Created Jan 29, 2022

Randomness workflow

24
    g

Glideapps

14 Steps
1

First, we construct a "Random" table that will house our random number for the flow.

First, we construct a "Random" table that will house our random number for the flow.
2

1st column: "Random Number"

This uses the Number > Random Number plugin by Glide, with the seed being the current date/time (so it constantly changes).

1st column: "Random Number"
3

2nd column: Total Items

Counting the total items/words you have in your database.

2nd column: Total Items
4

3rd column: Random Position

Using a math column to calculate the index of the row we're going to show.

3rd column: Random Position
5

4th column: Random USC

The static column where we will actually house the random position generated by Glide (using set columns).

4th column: Random USC
6

5th column: Random SV

Using a single value column, we return the row ID of the random row, using random USC as the input for "row" (starts from 0).

5th column: Random SV
7

Secondly, we go back to the "Favorite Things" (or Words) tables to construct a few additional columns.

Secondly, we go back to the "Favorite Things" (or Words) tables to construct a few additional columns.
8

Add a user-specific boolean column

This column will determine if I'm going to show the description of the item or not. This equates to the "preposition" in your case.

Add a user-specific boolean column
9

Add an If Then Else column to determine the description of the inline list

If the user-specific boolean is not true, prompt the user to click the item, else show the description

Add an If Then Else column to determine the description of the inline list
10

Add an If Then Else column to have a dynamic boolean value

This will help users switch back and forth between showing/hiding the description on the front end.

Add an If Then Else column to have a dynamic boolean value
11

Going to the front end, add a button titled "Get me a thing"

The action tied to this button will be setting the generated "Random position" column to the "Random USC" column and make it temporarily static.

Going to the front end, add a button titled "Get me a thing"
12

Add an inline list pointing to the "Favorite Things" table

The action tied to this will be setting the "Set value" if then else value to the "Show description" column to help switching between showing/hiding the description.

Add an inline list pointing to the "Favorite Things" table
13

Setting the visibility condition for the inline list

The inline list should only be visible when Random USC is not empty. This prevents cases when the random USC is empty but the random SV column still returns the first row (since it interprets empty as 0).

Setting the visibility condition for the inline list
14

Filter the row to show

Filter the rowID to be equal to the screen's Random SV value.

Filter the row to show
Well done!
Create how-to guides like this in a snap. Get Tango now.