Inlist sort order

I have two tables or sheets named “Workouts” and “Exercises”.

Each Workout can have 1 or more Exercises. In my case both these tables have rowids.

I add Exercises to Workouts by using choice components. The Workout table has fields named Ex 1, Ex 2, Ex 3, upto Ex 8 - ends up as an array field: Ex

When a Workout is selected, I show an inlist (using the Workout->Exercise 1:many relationship) along with other Workout detail.

I want the inlist component to maintain Ex 1, Ex 2, Ex 3… Ex 8 as the order of listing. If there is another way to do so let me know.

If the sort order for the inlist items is RowID (A-Z)

  • Can I assume this will always be in the order of Exercise items i.e Ex 1, Ex 2, Ex 3 …upto Ex 8 ?

Grateful for a confirmation

If you sort the list by RowID alphabetically, then you are going to get random results because rowid is a random generated value.

Using the array for the relation will not guarantee the sort order of the list. The sort order of the list is determined only by the values in the exercise sheet.

If you are saying that an exercise could be either the 1st position or the 5th position and you want to respect the order they were entered in the workout, the I would create a relation for each ‘ex’ column and create an inline list for each relation.

Thank You Jeff.
Here is what I did as you suggested with a small twist.

Created 8 Workout->Exercise relations for each of EX1 to EX8 attributes. Even though EX1 in Workout has a 1:1 relation with Exercise, I had to indicate 1:many to enable INLIST component to see it.

Now I can maintain the desired order with a bit of extra work.

1 Like