Get Last ID, Insert Into Other Table

I want to do this

get value from multiple select as newRefs;

insert into table1 ('name') values ('pete');

SELECT LAST_INSERT_ID() as newUserId;

for each (currentRef in newRef) {

     insert into lookupTable1 (userId,ref) values (newUserId,currentRef);

}

Actually there is a quicker way to do this with MySQL/MariaDB as noted here
https://dev.mysql.com/doc/refman/8.0/en/insert.html

What do I need to do this?
Do I use Data Store Entities, Record Types, etc.?
I can't be the first one that want to do something like this.

  Discussion posts and replies are publicly visible

Parents Reply
  • This SHOUD be pretty simple, but for whatever reason this is not working.
    I'll go back to what I said previously, this appears to be a BUG.

    This is pretty darn silly, 15+ hours just on something like this.
    I thought that one of the benefits of Appian/Low Code was quick development.
    I'm pretty sure that had I used SpringBoot for the backend and React for the frontend development that this could be done in that same 15+ hours.

    Given that I'm using the free community edition in the cloud there is little I can do to see what is actually happening in the background.
    I guess I'll look into creating a Stored Procedure/Function in the MySQL/MariaDB database providing Appian can execute them.

Children