Add Winner Increment Number to Profile

So I have a battle between 2 users , users vote and when the timer runs down the person with most votes is the winner. This is done using If/Else columns but I need to increment a number of wins to that users profile.

How can I do this?

How long is the timer? You can’t do time-based actions for now, but I’m curious if the timer is short enough that a wait module can work.

I have it at 60 mins now…but nothing set in stone…I thought about the wait for condition but didnt try it yet. What is the max seconds allowed do we know?

So this works fine and then I have a component to show the winner once time remaining is less than 0. I need to be able to increment a number on only the winners profile which is the hard part

Only things I can think of

  • Create a relation and rollup in the user table pointing to the battle table to automatically count the wins.
  • Create a button that performance an Increment action that someone clicks after the battle is done.
1 Like

Yes , I just added the button option for the winner and seems to work fine. I’ll double back and try the rollup option though

1 Like

What is the best way to grab the wins from the Profile table? My action at the moment is the user “adds to victory wall & increment profile wins” but I cant use this number for a leaderboard because obviously there is a row owner in the use column.

Rollup to the wins in the profile table gives me all the wins figures , not just each users.

You have to decide if Row Owners is important in your user case. Does the profiles table need to be secure and protected from other users…especially if the whole point is to have public battles between users? If you don’t need Row Owners, then just remove it. If you do need it, then you probably need another table without row owners and only minimal info for each user that is participating in a battle.

1 Like

I guess theres no need to keep the profile private. I’m just so used to that approach from my other apps. A simple but effective solution. Thanks for twigging my brain today :slight_smile:

1 Like