How to Use Database Multi Insert - Can You Help Me Please?

I’m trying to do my first multi-insert and am going round in circles… could someone tell me where my simple error is please?

Situation

I have a test_item table with various fields like first_name, last_name. A test_item can also have one of several regions they are associated with, so I have:

Setup - Array of Selected Regions - selected_regions

I have created a user interface to select the different regions:

q1

These are stored in the array selected_regions. I know this is populated as it creates the display showing North and South in the above image.

Setup - Server Action - update_test_item

In my Server Action, I bring the reference to my array selected_regions through with a $_GET:

q100

and then created a multi-insert

q101

In the Database Insert part of the multi-action, I insert the array value as follows:

q110

And to set the $_GET variable, back in App Connect I have a Server Connect element for the Server Action, setup as follows:

q103

What Happens

The form which activates the update_test_item Server Action:

  1. Writes the simple field values such as first_name, last_name okay
  2. Deletes existing entries in test_item_regions okay.
  3. The Insert Multi doesn’t insert the new values.

What I’d Like to Know

Is where I have gone wrong in passing the array selected_regions through to the Server Action multi-insert!

Community Page
Last updated: