Adding Points to List of Users

Hi,

How can i add Points to List of Users?

i have a thing called Winners inside winners has the ff. player details

  • Name
  • Player ID
  • Fight ID
  • Winning Amount

now i have a button that will trigger to send addition points to each user winners

what i’m doing is do a search for User’s Points + do a search for Winner’s Winning Amount with constraint Player ID = Current Page list of Player’s Player ID

Is there a question here?

No sure either, @keith but @jigsgfx.gj raises a key point: I hate searches because they’re so inefficient, they can really slow down even the simplest behaviors. A better solution might be to “make changes to current user” (under “Account” when adding an action in the workflows) every time they win something:

“points = current user’s points + winner’s winning amount”

Good luck @jigsgfx.gj!

1 Like

yes i did that also the problem is, i need to trigger it using a single button

how can i do that if i have an RG that shows a list of Winners with their Winning Amount? but only visible players only not the one was hide because of constraint

Very good point, @k.linda5498. Indeed, storing info at the time of event is a good idea and it need not slow down the on-page performance.

In fact, if Users are frequently going to be winning “points”, an API workflow (perhaps called AddPoints that takes arguments User and points) would be a good thing to build. Every time a User’s score needs to be increments, just call that.

Maybe use the workflow action called “change a list of things” and filter the list to just the players for whom you’d like to add additional points?

To display the winners in the UI, use a repeating group of type user and filter the data source list so that it doesn’t include the current user. You can add a text element to the cell that shows the current cell’s user’s name and current cell’s user’s points.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.