Combine two repeating groups

Hello I am trying to find a way where you can merge two separate repeating groups into one. I currently have two separate repeating groups for a movie script scene from Chat GPT. One group is displaying the name of the character talking and the other with the dialogue the character says. As you can see here since they are not in the same repeating group and the repeating groups become out of sync which makes its hard to determine who’s line it is as the scene goes on:


My question is: How can I add these two things into the same repeating group so that they stay symmetrical and in sync with each other? I cannot use a data type because I am currently using a “split by…” function to separate the text into different lines of the repeating group. I am asking Chat gpt for a script and its giving me a single response that I separate into different repeating group lines by using “split by…”. So unless there is another way to split chat GPT’s response into multiple repeating group lines I have to make sure I stick with using custom states. I am using custom states currently for these repeating groups as you can see below. I would greatly appreciate help with solving this issue.

Hey @jpdougherty24 :wave:

Here is some advice that might work:

  • Do the split by (/) for each in the custom state.
    • Since you get them there somehow, I am sure you can split them by there as well.
  • Keep the first repeating group.
    • The data source will be the upload_script's NAME Response (splitted version)
  • Add another text field (or continue the existing Current Cell's text) and append the second one.
    • In the existing text field or new one, you should use upload_script's GPT Response (splitted version):item # Current Cell's Index.
  • Remove the second repeating group.

Simply, what you did is to use the first repeating group’s index number to access the elements in the second data source.

I hope this helps.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

It is working now! Thank you very much.

1 Like

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