Hello, This one is very tricky. I’ve got a text I get from an API, so I realized that for better filtering of the text I receive I need to split the text using regex (/\n/). I need to create a multi insert in my server action that takes the value “text” splits it and the insert each value to my database.
Of course, didn’t work because the value I set (SplitText) is an array without any text inside it, I need to insert the new split text into my database.
This is an example for a single database entry. If you need to do this if there are more than one records in the database, then you will need to insert a repeat in the server action and form an array for each record inside the repeat. Also on the page, you will need to wrap the button in an additional element that will repeat the database entries (in this example, there is no such repeater). In any case, if there are difficulties write. I’ll try to help.
Thanks for your time! But, that’s exactly what I already have.
I need to be able to generate a new record for each split word/sentence I have. Why? Because I need to run a query to the database afterwords to get the record based on the sentence (using “contains” expression on my query).
How do I create a multi insert record for each one of them? I need to create a record for each one. When I try to, it’s like there is no varible inside the array:
So for regular strings, the Wappler’s action picker will not show $value. Just double click the field, and instead of clicking the picker icon, just write $value in there.