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.:
Here are pictures of these tables to make easier to see how I have set them up
Exercise table:
Workouts List table:
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.
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.
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.
Either.
Hi Mark
I trying to interpret your Emoji:
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?
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:
([User Favourite] + LIST(USEREMAIL()) - LIST(""))
NOT(IN(USEREMAIL(), [User Favourite]))
ORDERBY(
FILTER(
"Exercises",
IN(USEREMAIL(), [User Favourite])
),
[Exercise Name]
)
([User Favourite] - LIST(USEREMAIL()))
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.
User | Count |
---|---|
38 | |
35 | |
27 | |
23 | |
18 |