ORDERBY function help

I have the following tables and relevant columns in Appsheet.

  • Table 1 called "Exercises", with columns the following columns:
    • [Exercise Name ID] - Key column type
    • [Exercise Name] - Label column type

  • Table 2 called "Workout Plan", with the following columns:
    • [Workout Plan ID] - Key column type
    • [Workout Plan] - Label column type
  • Table 3 called "Workout Plan Exercises", with the following columns:
    • [Workout Plan] - which is referenced to the above "Workout Plan" table via the [Workout Plan ID] column key
    • [Exercise Name] - which is referenced to the above "Exercises" table via [Exercise Name ID] column key
    • [Exercise No] - which is a number column type.

  • Table 4 called "Workout Day Exercises", with the following columns:
    • [Workout Plan] - which is referenced to the above "Workout Plan" table via the [Workout Plan ID] column key
    • [Exercise Name] - which is referenced to the above "Exercises" table via [Exercise Name ID] column key
      • I am looking for Valid IF formula for this [Exercise Name] column in this "Workout Day Exercises" table that will list the exercises in the "Exercises" table using the accending order of [Exercise No] then [Excercise Name) of the referenced "Workout Plan Exercises" table based on the same Workout Plan selected [Workout Plan] column of this "Workout Day Exercises" table that related to the same Workout Plan selected [Workout Plan] in related "Workout Plan Exercises" table
0 2 80
2 REPLIES 2

You can't really do that. Or rather, I don't recommend it in the face of a much easier solution:

Add a new column to the WDE table that references the WPE table (or change [Exercise Name] to be that). You can use ORDERBY in the valid_if of this column, ordered by the number.

Try:

ORDERBY(
  FILTER("Exercies",
    IN([_ThisRow].[Workout Plan],
      [Related Workout Plan Exercises][Workout Plan]
    )
  ),
  ANY([Related Workout Plan Exercises][Exercise No]), FALSE,
  [Exercise Name]
)

 

Top Labels in this Space