Inline list background color change when "finish" button clicked

Hello :slight_smile:

Im trying to make my own fitness app and i ran into a problem

theres a inline list of serveral exercises before the screen you see below
(but i can only link 1 picture cause im new user)

now the problem is i want “Øvelse færdig” (the big green button) to make the exercise from the inline list to go green so its visual easy to see that you completed that exercise
and then when you completed every exercise in the program there should be a button( e.g.“finish program”) that resets the color back to normal and goes back to the main screen

is this something that possible to make with glideapps? :slight_smile:

hope some of you knows the anwser :stuck_out_tongue:

have a nice day

Do you mean when you click the button it should check one of those checkboxes?

the check boxes on the screen above is another function in the app so ignore them :slight_smile:

this is the inline list that i want the background of to go green when i “completed” the exercise

hope you understand :slight_smile:

Doing that requires the use of CSS, which is not supported and is almost guaranteed to break in the not too distant future. So not a recommended approach.

Alternative approaches:

  • Use an alternative image for completed exercises. Perhaps a similar image but with a green background. Use an if-then-else column to select the appropriate image based on status.
  • Add an emoji (maybe a checkmark :white_check_mark:) to the Exercise description using a template column. Again, use an if-then-else column to either include the checkmark or not based on status
  • Make use of the Caption in the inline list to indicate the exercise status
  • Use filtering
2 Likes

nice got the checkmark to work :smiley:

now the problem is i cant seem to make the blue button reset the value that controls “check or not”
(value is 1 or 0) if its 1 it will show checkmark and if its 0 it will show nothing

i think its because the check function is in the “exercise tab” and the blue button is on the “program tab” so im unable to make the button change value back to 0

i have tried to make a connection between the tabs that makes me change the value from 1 to 0 but with no succes

Can you show me a screen shot of the two tables that you want to link? (not the tabs/screens, the actual tables that contain the data)

the blue button is on the “trænings progammer”

mmm, okay. This is a little confusing, but I think I get it. If my understanding is correct, then I might have a suggestion for a better way to do this. But first, I have a couple of questions…

  • Am I correct in understanding that if an item on the Overkrop 1 screen has the green check, then when you open that item you would want to see all 5 boxes checked on the next screen?
  • Also, does it then follow that the green check on the Overkrop 1 screen should only be there if all 5 associated steps have been completed?
  • And finally, how do you currently set the value in the “Check Eller ej” column?

If you can clarify the above first, then I may have a suggestion for you.

hopes this helps clarify what im trying to make :slight_smile:

just ignore the 5 boxes as they will show “reps and Kg” when checked so it has nothing to do with the problem :smiley:

the value get set to 1 from a custom action within the green button

knap

hmm, so maybe my understanding is not correct.

Just going back to your earlier question…

the blue button is on the screen that shows the list of exercises. What do you want to happen when you tap the blue button? Is that supposed to change the status of all of them? Or one of them? If one of them, which one?

the blue button is just supposed to reset the green checkmarks and go back to the main tab
that way the program is ready for your next training session :slight_smile:

because as it works now the checkmarks will stay there forever and thats not how i want it :smiley:

So it should reset all of them?

yep :slight_smile:

There isn’t a way to clear a column in multiple rows at once. At most you can clear a value through a single relation to only one row.

I would consider a different approach. Essentially you need to set a Unique ID in a table, such as a user profile table. Then create a Single Value column or a Template column that retrieves that Unique ID from the user table an populates it across all rows in the Ovelser table. Then whenever you you mark an item as completed, write that unique ID to the ‘Check Eller ej’ column. Then you can check if both Unique ID’s match, and if they do, set the checkbox emoji. When you are ready to reset, then you change the Unique ID in to the user table. I go into more detail in the post below.

2 Likes

Hi Jeff :slight_smile:

now i can reset the checkmarks but once i have “checked” all the exercises the “check eller ej” will be 1 forever

that means the next time i start a session first exercise “check” will checkmark every exercise in the program so i have to find a way to make “check eller ej” reset once the reset button is pressed

but thanks for the tip i got a bit further :stuck_out_tongue:

Jeff’s solution will work, but it sounds like you haven’t quite got it right.
The “check eller ej” should never contain the value 1.
It should only ever contain the UniqueID that comes from your User Profiles table.

1 Like

The key with using a Unique ID instead of ‘1’ is that it will always be unique whenever it changes. You only want that unique ID to change when the user clicks on the reset button. Once it changes, then it will no longer match the ID that was saved until they start to mark each exercise as completed. At that point, the ID will match.

1 Like

@Jeff_Hager @Darren_Murphy

wow thank you so much i finally understand what you guys were saying :slight_smile:

it WORKS been fighting with this problem for quite some time and thought why not ask on forum :smiley:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.