Deleting lowest member in group

Hello, I currently have a database with two fields, the users name, and a color

Untasdasdasditled

As displayed in this repeating group, there is a vote, and the user “Charles” has the highest percentage in the Green group, while the user “Charles II” has the highest percentage in the Orange group. I want to then using a scheduled event delete “Charles III” from the group because they did not win anything. Although, I am not sure how to single them out using constraints. I can sort who has the highest percent, but I don’t know how to sort based on who has the highest in each group, which is why I am looking for help. Thanks!

Hi @Drahgoone, how are you calculating the percentage? Is it within the RG? If saving that value to the database is possible, that will make things a lot easier.

For example: Search for Users where Group = Group parameter and Percentage is less than Group’s User’s Percentage :max

If you’re not saving the percentage, you may need to perform whatever calculation you’re doing in the RG in order to re-locate the “losers” in your API workflow.

You can try the following:

Schedule an API Workflow on a List, the list being the list of Groups. Your API Endpoint would need a parameter for Group so that the Schedule action can pass “This Group” to the endpoint.

The endpoint would run a Delete a List of Things action. Type of thing = User, List = Search for Users

  • The search has a constraint: Group = Group Parameter
  • The search has another constraint or (more likely) an Advanced Filter to isolate only users who are not the highest percentage. If you need an Advanced filter, then your List to Delete would be “Search for Users :filtered” — > Advanced: Calculation Here. I don’t know enough about how you’re calculating to offer more than that, but I hope this helps somewhat!

Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:

2 Likes