Skip to main content

Hi guys,

Hey, guys,

Please help me solve a problem - I have a table of tennis matches, which has fields Player 1 and Player 2, which are linked to another table Players. In the matches table next to the Player 1 and Player 2 fields, I want to add a single select field Winner, which will have only 2 values: Player 1 or Player 2.

Is there a formula that will allow me to create a single select from the values of the neighboring fields?

Thanks.

Hello!

You don't need a formula to make this work actually. Assuming you have an identifier, username or fullname in your player records:

  1. Go to your Matches table.
  2. Add two Lookup columns.
  3. Set the Source of each lookup to Player 1 and Player 2.
  4. Set the Field Lookup to your Id/username/fullname.
  5. Now add your Winner column with Linked Record type.
  6. Enable Filter record selection by a condition.
  7. Set two conditions with the following sentence: Where [Username] is [Lookup from Player 1] or [Username] is [Lookup from Player 2]. To enable the selection of lookups, click on the gear icon next to each condition and click Dynamic Condition.
  8. Click Save.

Here are some screenshots for the configuration of the lookup fields:

 

The Matches table:

 

The Winner field configuration:

 

Final output:

 


I don't think creating a single select via a formula like that is possible I'm afraid, and I think the best we can do is something like this:

SWITCH(
Winner,
"Player 1" , {Player 1},
"Player 2", {Player 2}
)

 ---
@EvreuxPendragonthat's a really neat solution!


Thank you all guys,

You've been a big help. I'm just surprised I didn't think of this solution myself 😊


Reply