Relation being sorted incorrectly

I have a teams sheet, with all of the team’s information:

  • Team name
  • Image
  • Record
    And more

I also have a sheet with a bunch of different games.
This sheet contains these columns:

  • Home team
  • Away team
  • Make Array (Home Team + Away Team)
  • Relation Column (to the Teams sheet)

The relation column gets used in an inline list, but the problem is that the Relation column gets sorted in the Teams order.
This is not optimal, since I want the Home Team to be shown first.

I can only sort the Inline list according to the Teams sheet, not the Games sheet. This means I can’t get access to which team is the home team in the Inline List. Maybe I have to change my whole structure up.

How can I fix this?

1 Like

How is the column used in the list? Are you doing a lookup column on one of the fields in the relation? Relations are not actual data – they are pointers into a table. You cannot sort by the pointer – you must sort by a field in that related table. So add a column which is a lookup on the field in that related table that you want to sort by, and use that.

There is a roundabout way to do it. You would have to change the action on your game list to a custom action that would first write the home team for that game to a different table, such as the user profile table. Then follow that action with a Show Detail Screen action. That way, whenever you click on a Game in the game list, it will write the home team to the user profile, before showing the game details.

Then bring that home team into the team table using a single value column. Finally create an IF column in the team table. Set that IF columns to return 0 if the team in that row matches the single value home team, else return 1. Then you can sort your inline list of the two teams by that IF column value.

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.