Check box in RG

Thanks for coming to see my topic.
I’ve been looking at a very simple problem for two days.

My repeating group gets a list of “keywords” from the API.
The list is updated in the “brand keyword” state of the repeating group.
And in the initial content of the input box in the repeating group, the “brand keyword” state is displayed in each current cell.

And when someone clicks the button below, the list of text in the repeating group is saved in the DB.

These is where the problem starts.

  1. I hope that if I uncheck the checkbox of my current cell, the value of the input box associated with that checkbox will not be saved in the DB.

  2. If I modify the text of my input box, I want the modified result to be saved in my DB.

Thanks again for coming to help me with my problem.

If I got the idea - you’ve already created a custom state “brand keyword”? How do you populate it with entries?

Hello @studio.be.lazy !!!

I guess the custom state of your repeating group is a list of keywords.
So each time the button is clicked you would like the DB to save all the “keywords” that are checked.

To do this, simple.
you will already start by creating a new custom state for your repeating group that you will call for example “selected” which will be a list of texts. We assume that’s done.
Then in workflow you will do a “do when checkbox is checked” “only when repeating group’selected doesn’t contain current cell’s text”
action to add? : set “selected” state of repeating group, value should be “repeating group’selected add current cell’s text”
and you do the opposite with another workflow “do when checkbox isn’t checked” “onlywhen repeating group’s selected contains current cell’s text”
action to add?
“set selected state of repeating group”
Value should be: repeating group’s selected remove current cell’s text

After that works you do you workflow for button like: when button is clicked “create a new things” (I’m going to assume that in your database you have a keyword type with a field key which is a list of texts)
Key add list repeating group’s selected value

Hellow, Wilson
Thanks for posting the answer.
I fully understand what you meant.

but,
I’m stuck at this part. "set “selected” state of repeating group,
value should be “repeating group’selected add current cell’s text”

In my workflow, there is no “current cell’s” item.

Do you know why it’s not coming out?

what is the first parent of you checkbox ?

This seems to be a data type mismatch error. What’s the type of content of the custom state and the value you’re trying to save? Can you share some screenshots or a loom video of the setup?

Himanshu
Bubble tutorials

This topic was automatically closed after 70 days. New replies are no longer allowed.