Easiest Way to Save/Assign Checkbox Values?

Is the using the States and Lists method the simplest way to save the ‘checked/unchecked’ value of a fixed checkbox to a Thing?

I.e. each checkbox item having a workflow that appends itself to the State of the Group, then entering the State as a whole into the database using a button?

This previous post is a great example: [SOLVED] Multiple - Check box values to Bubble DB

Makes sense, but is cumbersome when having large volumes of checkboxes.

Thanks!

1 Like

I’d think the “simplest” way would be having a separate yes/no’ type field within the thing for each of the checkboxes (if there’s a finite number of checkboxes anyway, not generated dynamically somehow).

Then you can have them autobind, saving yourself workflow runs. And later you can filter by yes/no… but that all pretty much depends on specifically what you’re doing with them afterwards as to whether it’ll be a better or worse solution…

1 Like

@james.k.grover what you’re describing is how I originally set this scenario up until I ran into the post I linked to. I got a little confused in my workflow, which is why I went searching for an alternative method. Do you happen to have an example I could see?

Also, is that a Venue Profile in your profile picture?

What are you trying to do with it? I dont have a specific example, but i can probably explain in terms of yours if you can summarise.

Generally, you’d have a Thing with a boolean (yes/no) field for each potential checkbox. Then you just point the checkboxes to those fields with dynamic data, like checkbox A’s default content is “current thing’s field A’s value”, and turn on autobind for those checkboxes.

Then when the user checks or unchecks each box, it’ll update the database immediately. Then when your sorting into whatever lists youre using, just “do a search” and constraint by “boolean is yes” or whatever you need. It should make sense when you try it.

(Just remember to allow autobinding on those elements for all users in the privacy tab)

And no just a midi controller in the photo, nothing fancy! Haha

Hmmm. Let’s say I’m trying to choose favorite colors for a person, and then display them. So “Jim likes blue, purple, and red” out of 5 color choice checkboxes provided. If Jim is a Thing “Person”, would I

-create a field under Thing Person named “Favorite Colors” and assign it to a Thing that is a list of colors with booleans? Then how to assign checkboxes to the list as autobind does not seem to allow it this way.

-or-

-create each color as a field with a boolean under Thing Person. Then how would they get displayed as an RG if they are not a list?

I’m getting a bit stuck…please see the public demo I created and feel free to edit to solve:

Thanks!

Ok still loads of ways you can do it depending on what your end goal is. I’ve added 2 methods you can poke around with to understand. Enjoy!

This is great, thanks!

Any suggestions on what would be a good way to display the checkbox method results if RG is not applicable?

Well if you dont need the repeating group, theyre not really results at all. You’d just show all the possible checkboxes, and the user can check or uncheck as they wish.

Hi, I have done with the demo, but the function “:plus” in the workflow doesn’t appear while defining checkboxes custome state value. Could do you tell me why it does’nt appear ?

Can you make sure your custom state is set to ‘list’?
image

Here’s how it should appear in the custom state view (‘List’ is checked):
image

I cant imagine easier to create and assign a value to a variable. I stick to the approach that an any website should be scalable and flexible. I would prefer to use list in 99 case as it is scalable. You can set events, retrieve data, pass data from one or (which is likely is an option set) several value from a drop down