Database insert through a query

Hi all,

In the database I’ve got 2 tables, (customer details and bookings) linked trough the ID field as foreign key. I’m building a form, where a new customer would enter his details and in the same form would chose a booking date.
So far, I’m able to insert either new customers or booking times, not both a time. I’ve tryied to build a database “view” in navicat. I’m able to see it under the Wappler’s database manager, and select it as origin in the Insert API, selecting all the required fields. Make the varaibles, make form with the generator.
But when testing, I get “server error” on the browser.
Any ideas what am I doing wrong?
Cheers

You can have two Data Insert actions in the API. The second one can then reference the ID returned by the first one. So you insert the customer, then insert the booking and use the Identity variable of the previous insert for the customer ID in the booking record.