Help in Creating a lobby

Hi Guys I am trying to create a group lobby where I can admit 4/5 users.

Scenario, I have added a group along with a button saying Join room, Once the user click he gets admitted to that room and you can see his details, now 2nd user comes clicks the same button and acquires another spot, similarly 3rd and 4th user.

Just like game lobbies, I want user click and be added and once user count is more 1 I want to trigger an action such as group call.

Please advise how can I do this.

  • Create a data type called Lobby. That data type will have a list of users.
  • Create a list on a page with all the available lobbies.
  • A user clicks on a lobby, a workflow adds that user to that lobby’s list of users.
  • The workflow blocks if there are already 5 users in that lobby.

Would this help?

1 Like

@rico.trevisan Thank you for your response.

creating list you mean adding repeating group?

Yep, a Repeating Group.

Yep great. It worked. I now can add 4 people and able to fetch there details.
In case the current user join another cell (Lobby) I want him to be automatically removed from here, any idea?

1 Like

Hmmm… I would probably:

  • add to the User data type a field called Active Lobby.
  • when the user gets added to a Lobby (the previous post), you also need to create a workflow step to change the User and add that Lobby to the User’s Active Lobby.
  • when the User joins a new Lobby, the workflow should:
    1. Remove the User from the previous lobby (it picks that lobby by looking up the User’s Active Lobby)
    2. Add the User to the new Lobby
    3. Add that Lobby to the User’s Active Lobby
1 Like