i am trying to make a prediction/betting app for my school, but I am really having trouble figuring out how to award people money once the winner has been confirmed. i want it to be so that when an admin confirms the winner and submits the form, a workflow happens where it checks for users with the winner in their prediction (activity) and if so they get double to points they bet (increase number in column).
If someone can tell me how to get a remix link or something, I can share that.
help would be so appreciated.
Sounds like the solution could be:
- Math column calculating extra points for the user.
- Query checking if the user’s prediction was correct.
- Workflow looping through all users and writing additional points to the basic users’ points column if they met the criteria.
do you know if there is any existing threads/topics with a demo link/video explaining a similar thing?
Not sure if a similar app has been built or if there’s a video of it. But there are tons of good materials on Glide Query (or you could simply use if-then-else form what it sounds like).
And for bulk row editing there’s Glide Workflows and Glide Call API.
I’m not sure if you need a form to trigger something. Can’t you just have a math column to calculate the winnings?
that is pretty much it but the thing I am having trouble with is actually giving the user the points. so that when an admin on the admin page of the app submits a form (
it - via a workflow - does the following:
- updates the event winner to be the winner (for eg, Red)
- checks for users with the correct prediction and awards the points return (that I can figure out with a math column - points bet x 2)
Bulk row editing is an advanced functionality in Glide, you’ll need to use either Call API or Workflows with a webhook trigger. Do you have them on your plan?
im on the free teir, so i think not, but I’m sure there must be a way to do it without paying for a plan
Now, as I’m thinking of it, you’re right, there’s is an option. But each user will be adding the points themselves. Here’s how:
A dedicated single-row table with user-specific column for placing bets.
Admin will be setting the actual score and controlling the game phases - eg. closing the bet and revealing the score.
When the score is revealed, each user will be able to collect their additional points.
Open the image in a new tab to see how I did this.
that is almost exactly what i was looking for! thank you so much!
I guess I’m not getting this flow. If your form confirms a winner, shouldn’t the calculated columns give the users the points?
You can do a rollup on top of the math column to give the user their points.
Sure, anytime!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.