Update One Value from a *State* List

Hey everyone…

So I have a state which is a list. In this case a list of Answers to Questions. Each Answer has fields Question and Answer Text.

I want to find one of the Answers in the list and update its Answer Text… does Bubble have any syntax to find the one element of the list that I want to update?

I can’t seem to find any way to do that!

Best wishes,
Antony.

Make changes to a thing -----> [Element]'s list of things:Filtered

(filter the list of things down to the one you want:first item)

and then change the Answer text!

Does that work for your use case?

I’m not sure it does, as I’m trying to change a state and not a thing…

But as I’m walking around town with some clear headspace I’ve realised I can probably set up the replacement Answer as a state New Answer and then do on the state list:

state Answer List = state Answer List minus item: (The one I’m changing) plus item: New Answer.

I’ll check it out! :slight_smile:

1 Like

Oh gotcha! Yes that should work.

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