Please direct me if there is already an answer as I have not found one yet
I have a list of yes/no’s where I want to change one item to the other value.
e.g. In a data table I have an item which is a list of names and another item which is a list of yes/no’s.
(they cannot be separate records) I have two repeating groups, one showing the list of names and the other showing a list of checkboxes reflecting the current yes/no value. Let’s call this list “Confirmed”.
I’m trying to perform what should be the simple task of changing person number 3 in the list from no to yes when the box is checked.
How do I locate the item number in the list according to the repeating group’s index and change the value from no to yes OR yes to no?
Use one repeating group and set the source as your data table. Then, when you update the checkbox you can specify in the workflow to update the current cell’s item. You could also set it as binding for it to automatically update without workflow.
⠀⠀⠀
If this solved your problem, please click Solution under this comment. ↓
So I was able to play around with this more today and in thinking about it, I think I posed the question wrong. Telaholcomb, I understand the answer you gave as I understand repeating groups pull a list from a data table. That’s pretty simple. BUT I realise the correct question is actually, How do I change a specific value in a Multi-Value field? That’s changes things a little.
For a little more clarity the table looks something like:
(Item Name), (Item Date), (Multi-Value), (Multi-Value), (Multi-Value), … other single fields)
The multi-value fields are person’s name, person’t number and confirmed. I have three repeating groups that pull up the multi-value fields which all work. What I want to happen is when say person #3 in the list confirms, I check a box and item#3’s value in that multi-value list changes from “no” to “yes” (and visa-versa)
Because it’s a multi-value field, binding will not work. (at least I don’t think so).
Yeah this is a bit tricky. I think the way to go is to use a plugin to extract the values as a list, outside of the repeating group. Some options would be the Orchestra plugin (free but some work to setup) or BDK’s RepeatingGroup Tools (paid but straightforward).
Once you have the list extracted you can just overwrite the old yes/no list with the new values.
Obviously having each crew member as a separate Thing would make this trivial, but I gather that is not an option from your previous post.
Crewmember Availability thing
Crewmember
Event
Available Y/N
(so a many to many)
I can’t think of a good reason why having two lists and trying to update item #x in list A based on a search of List B’s item # is the right thing to do.
The only reason to do that is because you did it wrong in the first place. Sort that, and everything else will be simpler
Thanks for the responses! Maybe I’ll back up a bit here… I built the tables this way to be more efficient with the data. So here’s a general overview of the why’s (and maybe there’s a better way)
Crew members are registered users of the App so I can’t really have a separate crewmember thing. The registered users contains their names, numbers and an “Event” list (which is how the app knows what events they are assigned to).
I then have an Event Thing which contains all details about an event including what crew is assigned to it. There can be multiple Events with the same crew member assigned to each of them.
I chose to use lists in the Event Thing for assigned crew to prevent the table from growing too big. I.E. 20 Events with 30 crew each suddenly makes that data table 600 records.
When a crew member logs in they see the events they are assigned to: (From the registered users Thing)
They click an event and see the details (from the Event thing)
On the Admin side, an administrator can confirm crew (listed from the Event Thing)
(“no” is the current value of that item in the list)
Hopefully that gives a clearer picture of why I’m trying to do it this way.
I might try a plugin as robhblake suggests but it there’s a better way I can try that too
@shane.archer Yeah I’m with Nigel on this one - think you would have an easier time working with your data if the database was structured differently. The plugin approach is a bit hacky, not the way Bubble is meant to be used.
So in my mind you will have two data types:
Users (can segment between Crew and whatever other type of user you may have)
Events
Have a field on the Event for Confirmed Crew (being a list of Users). You can also have a field Invited Crew (being a list of Users). So for each event you can easily display a list of crew members associated with the event (using the Invited Crew list) and by comparing that list to the Confirmed Crew list you can get a list of who has / has not confirmed.
Hope that is clearer? I can do up an example later if more helpful.
Hey @shane.archer You can use this:
Make changes to thing (your thing)
MultiValueName= Setlist YourThing(MultivalueList Value:each item: find&replace)
text to find: Current text or whatever value you have
text to replace: Your new value to place (Input value or uploader etc)
This will reset the MultiValue List once, and again push the values from scrach (Replace basically) and the text you want to replace will be replaced with the new one meanwhile.