Edit repeating group with custom state data source

Hello I was hoping to get some help on how to edit a repeating group with a custom state. The video above explains everything. What should I put as the new value of the custom state? If there is not a way to add a value here then what are some ways I could use to edit a repeating group with a custom state as a data source?

Thank you

Here’s how I approach this:

I do this with a Custom Event, with 2 parameters: Row, and InputText. Within this custom event, the step I add is to set the state. The value of the custom state is the custom state’s list: each item:find & replace. On the Find & Replace dialog window, the Text to find is the parameter ‘Row’. And I replace it with the parameter ‘InputText’.

Now I have a ‘pencil’ icon on each line, and when I click that pencil it shows that line’s text in an input (and then I hide the text element). I then have a save button that appears, and clicking ‘save’ triggers the newly created Custom Event.

Here I define those parameters: ‘Row’ I set to ‘Parent groups text’. ‘InputText’ I set to the Input’s text (the one that appeared when the pencil icon was clicked). This also now hides the Input, and makes the text element (now with the newly edited text visible)

And hopefully that should point you where you need to go!

If you use custom states for this and aren’t saving it to the database anywhere, you will lose any changes when the user refreshes the page. If you don’t want that to happen you may want to run a workflow on the list returned by Chat GPT, save the lines to your database (perhaps attached to a datatype of script) and then use the result of that as your data source. That way any changes your user makes will also be saved.

There are a couple of different ways you could store the lines. You could save them as a list of texts on the parent data type and then use the great solution that @msgiblin explained (you may want to get ChatGpt to add a number to them at the beginning so that you can search by that just in case the same line appears multiple times in the script). Or each line could be it’s own piece of data and individually editable.

If you want more information about any of this just let me know.

Hopefully that helps in some way.

1 Like

Yes good notes! In my suggestions above, you’d still need to add a Save button and create a workflow to Make Changes to Thing, and then overwrite that thing’s script with the Custom State’s list of things.

Still having some issues with doing what you told me to do. Here is what I have so far.
Here are my parameters on the custom event. I wasn’t sure what type to make them so i made them type “text”


However when I try to add the value of the custom state when i use “set state” it comes back broken “highlighted red”. I tried to find “list: each item:find and replace”


Do you know what is wrong with that workflow?

Lastly Im guessing you want a popup to appear when you click the edit icon? If so, why is the current cell’s text not coming up in my popup’s input value? when I click the edit icon in the third cell, the input’s value is not set to the 3rd cells value. Instead I see the whole entire response from chat gpt. Do I need to set a data source type to the popup?

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