Set value inside repeat in server connect

I have a text variable that I am adding to based on a repeat loop. After the loop is finished, I want to save that variable into a data field with a data insert query. I get nothing. The loop works as I’m inserting rows into a table as it works and that works great. Just don’t understand what I’m doing wrong here.

What you’re doing wrong is not showing a screenshot of your Set Value :slight_smile:

First thing to check if it’s defined as a Global variable, by having the “Global name” field filled


here you go. It’s a post variable coming from a form and im changing its value with set value based on the data queries. I filled in the global name as the same so I thought they would be treated as the same. Is that not correct?

Sounds good! You can do a Set Value meeting_description with an empty value before entering the Repeat loop, then it should appear in the Data Binding Picker

Set Value meeting_description =
Repeat:

  • Set Value meeting_description = (what you already have)

Database Update

Don’t forget to fill the global name as well

1 Like

thank you, that worked!

1 Like

I’m glad you have this working depending how large your databases are might have a little speed improvement if you use the JOIN formatter on a multi query outside the repeat opposed to repeating a single query x times.

For example:

To then get your meeting description you can just edit the joined variable to:
$_POST.text2+query.join(',', 'categories_name')

Using your variables this was just a quick example.

This would result in:
My meeting description Jason,Bob,Lance
You can use any join separator so could make the comma a space etc

Please note this is purely optional and if your databases are small in size and the team members array is always pretty small this most likely won’t add much speed to the action.