Column Location

There are games played by four players, each of which is ranked. Users can see the Rank of the games they have participated in.

I created the following database, and was able to create the desired application by filtering myself in the Inline list and displaying my Rank at that time.

| UserID | GameID | Rank |
| user1  | game1  | 1    |
| user2  | game1  | 2    |
| user3  | game1  | 3    |
| user4  | game1  | 4    |
| user1  | game2  | 2    |
| user2  | game2  | 1    |
| user3  | game2  | 3    |
| user4  | game2  | 4    |

However, this database would accumulate too many records for each game. So I would like to create a database like the following to create the desired application.

| UserID 1 | UserID 2 | UserID 3 | UserID 4 | GameID | Rank 1 | Rank 2 | Rank 3 | Rank 4 |
| user1    | user2    | user3    | user4    | game1  | 1      | 2      | 3      | 4      |
| user1    | user2    | user3    | user4    | game2  | 2      | 1      | 3      | 4      |

With this design, is it possible to display the Rank of the games I have participated in in an Inline List? The problem is that I don’t know where the column that contains my ID is.

Any help would be much appreciated it!

  • I Added examples.

With the second design, it’s only one row so you can’t display them in an inline list. If you want to display records over multiple games then you should go with the first way.

How is the rank currently calculated?

You could probably create an IF column that checks is the email in that column and returns the rank number. So If User 1 is signed in user, then ‘1’, Else If User 2 is signed in user, then ‘2’, etc.

This would give you the rank, and if the If column contains 1-4, then you know it’s a game you participated in.

1 Like

I’m sorry, I didn’t explain it well enough.
The results of the game are added externally. So there is no need to calculate the rank.
I added examples.

My answer would probably still be the same. You just need an IF column to check each of the 4 columns to look for your email address and based on your desired sheet layout, you would just return the rank column value that corresponds to the userid column that has your email address.

If you are looking to just display any row that contains your email, then a filter that checks all 4 columns will work for that too.

2 Likes

Excellent! This is exactly the solution I was looking for.
By the way, when I do that, is it possible to display the UserID and Rank at the same time in the Inline List?

Assume I am signed in as user1. Inline list of games.

--------
game1
1
--------
game2
2
--------

When I tapped game1,

--------
user1
1
-------
user2
2
-------
user3
3
-------
user4
4
-------

When I tapped game2,

--------
user1
2
-------
user2
1
-------
user3
3
-------
user4
4
-------

Is it possible to get the Rank (different for each game) associated with the user, as shown above?
In the first way it was easy.

Please!

Do the user number changes from game to game? Let’s say I’m user 1 in game 1, do I always stay user 1 in all other games?

If it’s not, and you’re using the userID to relate back to the user profiles. I’m thinking you can show what you need like this.

In the list of games to view, before viewing details for each game, use a set column with a relation back to the user profiles to set the game ID (so you know the signed-in user is viewing what game).

Use a single value column to bring that “viewing ID” to all rows in the user profiles sheet, then a relation from that single value column to the rowID in the Games sheet.

With that relation, you can use 8 (not sure how this scales up but you’re stating you have only 4 players) lookup columns, 4 to return 4 player IDs, 4 to return ranks.

Then finally an if then else column, if player ID is lookup player ID 1 then lookup rank player 1, all the way to 4.

Sounds a little bit of a long con, might be someone else can make it faster.

1 Like

Thank you so much!
User ID is fixed even if the game changes. The user ID is the same as your email address.

1 Like