Forum Documentation Showcase Pricing Learn more

Setting a thing to be the default thing

If I make a database of things, am I able to have a user select one of those things to be the default thing ?

I’ve created a page with a repeating group. I want to be able to have a user select which thing they want to be the default.

Once selected, this thing is the default “thing” within the app.

I’ve tried created a yes/no field type, and then putting a check box in the repeating group. But when I select a checkbox, it doesn’t save and it doesn’t alter the things yes/no field.

How can I go about accomplishing this?

Can you try to reproduce the situation in the forum_app in a new page? Like this it’s a bit too theoretical for others to help.

Is there any documentation I can refer to as to how to post there? I don’t know how to find the forum_app

Oops sorry about this. I meant adding a page to this app that has what you’re trying to do.

No problem, thanks!

I’ve created a page called: njfrlng

In it there is a repeating group and a button to “Create a new item”

When user clicks “Create a new item”, a pop-up appears where they input a name, image. & value.

They click “Create Item” to finalize the item.

It then appears in the repeating group.

What I’d like, is for the user to be able to “equip” any of the items from the repeating group.

The “equipped” item will be used in other areas of the app. (For the sake of demonstration, I’ve created a group in the top right which says: “Currently Equipped Item”.

I’ve been trying to use the check box to change a yes/no data field which I could then use to create a new list of “equipped items”, but I can’t seem to make any changes to this field.

How can I make a selected item in the repeating group display elsewhere in the app?

Check what I just did. Added a workflow when the checkbox is modified. I think that does what you need no?

Awesome, works great!

But it doesn’t seem to save the check box on the page. It changes the value in the database, but if I leave the page and come back, it’s no longer selected.

Is this normal?

Never mind!

I figured it out on my own.

I need to make the checkbox dynamic!

This is awesome!! :smiley:

1 Like

Exactly! Bubble does what you tell it to do, so you need to define the initial value :smile:

What about restricting how many items a user can have selected as yes?

EX: I only want the user to be able to have 1 item selected at any given time. In order to switch items, they’d have to unselect the current selected item and reselect the new item.

You just need to think about the right data structure there to represent that information, and then have a condition on the workflow. Here, I would save on the user the selected item, and modify that value when the user select a new item.