Button Function: Select Data Randomly with Condition

This is a follow up to my previous post.

In this app, the user selects a studio activity type and a page will appear with an associated activity.

At the end of the activity there is a “complete” button.

The “complete” button triggers “complete” on the Activity Table, which will also add a value to progress tables on the User Table.

My goal is that when a user clicks a studio type, it will bring up an activity within that type that has NOT been completed yet, randomly.

This is not functioning yet… Could someone help assist me in repairing workflows or re-organizing to help? Let me know if any other screen shot references could help - thank you!

Activity Table:

User Table:

Workflow for the button to activate “Complete”:

Workflow for the button that is already “Complete”:

I don’t think you need to do an increment on the progress here if I understand your structure correctly. You can just do a rollup on top a query/relation.

How do you define “bring up”? Does it show a new screen or something else?

Regardless, you should be able to have a query of incomplete activities, and then have a single value column to return a random row from the query.

Thank you – How do I do a rolll up? I’m not sure I follow.

Correct, when a user clicks a studio type the workflow is - show detail screen, Target:Overlay. So far that seems to be working.

I’m wondering if my workflow is referencing the activity table in some way and if I need more "user specific” workflows, maybe I need more reference columns in the user table?

1 Like