I’ve set up some data and workflows, and while they work, there are some parts that don’t seem right…
I have a table called Skills that links a Skill to a User and gives the link a Skill Value (how competent the user is) Skills are an option set.:
I then have a User Group, Repeating Group of Skills (option set), a Skill Name, then a Slider inside a Skill Group to set the Skill Level:
Group: User
Repeating Group: Skills
Text: Current Skill Name
Group: Skill
Slider: Skill Level
Skill level is auto-bound to the record in the Skill Table, and I have a workflow to create new entries in the Skill Table when the User has not yet selected a Skill Level for that Skill. This all works perfectly, but the ‘code’ to do it is quite convoluted and does not seem right.
To update the Skill Table, I use the following ‘code’ when the Skill Level Slider’s value is changed from Null:
Skill Level = This Skill Level Slider Input’s Value
User = Current User
Skill = RepeatingGroup Skill’s List of Skills:item #Current cell’s index
Why do I need to use the index number of the cell to do it in a long winded circular fashion? Surely I should be able to use something like the following, but it’s not available:
There are so many ways to set up what you are doing in bubble. Can you post a link to your editor so that we can see exactly how you have set up all of your elements and workflows?
Everything looks good. There is a different way to do it as well but it adds more complication to the workflow. Basically instead of auto-binding the slider input you would have to make the slider input’s default value the search for skills and manually handle the saving of the slider position every time it was changed. This would allow you to make the slider’s parent group type, the parent element type (repeating group type) and you could pass the parent element to the create a new skill, copmetancey workflow.
You’ll run into a lot of things like that. Bubble is no code built by coders for people who know nothing about coding. Weird is normal here, but it works and it’s fairly easy to build with.
Thanks @sudsy - the method you suggested would work normally, but I need to cater for non-existing values in the Skills (now called Competencies) Table, and the Parent Group’s Skill is null in these cases. Otherwise that method works fine for updateing existing values.
I actually managed to resolve this elegantly in the Bubble way, by wrapping my data in another group to bring the grandparent values down. This is exactly the same as what I had to do with Group: User to bring the User details in (but for some reason did not think of it here).
Group: User
Repeating Group: List of available Skills (Competencies)
Group: Competency (current cell’s Competency) ← this is new
Group: Skill (searches my Skills Table for entries)
Slider: Skill Level (for selecting skill values and saving to the Skills Table)
Doing this, I was able to refer back to Group: Competency to get the values I needed when saving new entries into the Skills Table: