Suggested Values

Hi guys

Struggling to find documentation and threads that help me come to correct expression for what I want to achieve below

Below is my app and table structure.:

  1. Exercise table:
    -has a list of exercises
  2. Workouts List table:
    -List the workouts names
  3. Workouts Plan table:
    -Links a set of exercises for the relevant Workout above.

Here are pictures of these tables to make easier to see how I have set them up

  1. Exercise table:

  2. Workouts List table:

  3. Workouts Plan table:

So there is two things I want to achieve, of which for now I think I should just focus on point 2 below as point 1 might be a bit trickier to setup.

  1. I want the User Favourite column to be a EnumList and I am still trying to figure out how I going to go about populating the rows in the column with user emails seperated by I delimiter upon select a action button and then it would also need a another action button to remove that user from the delimited list but still keep the other user email list that have also marked that exercise as favourite.
    For now I manually populating the User Favourite column and concentrating on point two below as this might be tricky to setup - as mentioned above.

  2. So I want the list of exercises to be sorted alphabetically by exercises where the user’s email is listed for that exercise in question and the followed by the rest of the exercises that are not are not marked as user favourite.
    I am not sure if I should be using Valid if or Suggested values to achieve this?
    I initially thought that I should have a seperate Favourite Exercises that list exercises per user, but I do not want to show just user exercises. I want to show user exercises 1st for easier selection and then the rest of the exercises.

Any ideas on how to achieve this.

:confused:

Either.

Hi Mark

I trying to interpret your :confused: Emoji:

  1. Either I am asking a stupid question (which is very very likely :wink:)
  2. The way I want to achieve this might not be the best way to go about it (which is also very very likely :wink:)
  3. Neither a stupid question and or a good way to structure it…and maybe just challenging to achieve (I am hoping it is this one :wink:)

Order By
Thanks for directing me on what should of been a very obvious answer. It has been a while building apps and it looks I am very very rusty.

So I used the following expression in Valid IF…also curious if there is any implication to using Valid IF vs Suggested Values.

ORDERBY(Exercises[Exercise Name ID], 
	[Favourite Exercise], True, 
	[Exercise Name], False
)

One other question using the below example.

I have made the Computed Key for this table to ensure I do not accidentally add the same exercise for already added for the relevant Workout Plan:
CONCATENATE([Workout Plan],"-",[Exercise Plan])

…but how do I go about filtering out any Exercises in the drop down for the [Exercise Plan] for the that workout [Workout Plan] in the dropdown if I already had the exercise for that Workout Plan.

So I do want to see “Band Bench Press” in the drop down?

image

If you place your mouse pointer over the emoji, it’ll identify itself as “confused”. Your paragraph confused me.

When presenting a dropdown of Ref values, Valid If is probably better. When presenting a dropdown of some other type, Valid If requires the user to choose from the list, where Suggested values allows the user to choose from the list or to supply their own value.

I thought as much. Let me try and explain again.

So I have the following table called Exercises
of which the column Exercises[User Favourite] is EnumList Type.

I thought to have an action “Mark as Favourite” that populates the [User Favourite] with the users email address for the selected exercise.
Eg: 1@outlook.com

Would running the action again from a 2nd user (2@outlook.com) replace the 1st user (1@outlook.com), email address? Or woud I achieve the following that I am after 1@outlook.com, 2@outlook.com

The idea thereafter was to modify the below Orderby expression -that you direct me on, for another reference table to Exercise table to Order By the Exercise list by all excercise with that user email address alphabetically (i.e. marked as favourite) and then list the rest of the exercises alphabetically.

ORDERBY(Exercises[Exercise Name ID],
[User Favourite], True,
[Exercise Name], False
)

I hope I have explained it better this time?

So is this possible?

As my next question there after would be:

  • Is possible to have a another action called “Remove from Favourite”
    -And could this action remove only the user email address [User Favourite] but leave the other user email address.
    -So User 1@outlook.com runs the “Remove from Favourite” Action button and the cell changes from: 1@outlook.com, 2@outlook.com to 2@outlook.com alone.
  • Type: Data: set the values of some columns of this row
  • Set these columns:
    • User Favourite: ([User Favourite] + LIST(USEREMAIL()) - LIST(""))
  • Only if this condition is true: NOT(IN(USEREMAIL(), [User Favourite]))
ORDERBY(
  FILTER(
    "Exercises",
    IN(USEREMAIL(), [User Favourite])
  ),
  [Exercise Name]
)
  • Type: Data: set the values of some columns of this row
  • Set these columns:
    • User Favourite: ([User Favourite] - LIST(USEREMAIL()))
  • Only if this condition is true: IN(USEREMAIL(), [User Favourite])