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.

0 6 454
6 REPLIES 6

Steve
Platinum 4
Platinum 4

Either.

Hi Mark

I trying to interpret your Emoji:

  1. Either I am asking a stupid question (which is very very likely )
  2. The way I want to achieve this might not be the best way to go about it (which is also very very likely )
  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 )

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?

3X_a_c_ac87eaaf5b42202a78d8ec6fac4e68acaeb68e02.png

If you place your mouse pointer over the emoji, itโ€™ll identify itself as โ€œconfusedโ€. Your paragraph confused me.

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])

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.

Top Labels in this Space