How do I Use a MSSQL Sequence for Row ID?

Am watching an incredible video - the “mon de chefs” trainer “NodeJS for Wappler” from @ben .
I’m on video 7.
Great value in this series - doing very well - I knew I was going to get stuck on my 1st INSERT though!
The image below is from the API trying to post a new user registration.

My SQL Server legacy app uses Sequences (instead of Identity column) for primary key. (MySql doesn’t have this, MariaDB does). So for my 1st column, ID, you can see the code I’d use in T-SQL, but its using that as a literal for the numeric ID field.

How to I substitute “NEXT VALUE FOR xxx” into the INSERT statement?

Hi.
Have you tried not setting the ID field when inserting?
I haven’t used sequences in MySQL… but if they are same as PostgrSQL, it should be auto-incrementing and set the correct value at the time of insert without needing to specify anything.

nope, thats now how Sequences work in MS SQL. I need to execute the code I wrote.

Then you need to switch to custom query.
Wappler does not support they way you want in query builder.

ahh, ok, i’d heard something like that.
so in my API Security function, I’d just use Custom DB Query instead of database insert?
Do I still have access to the Cryptographic routines for the password?
Any other issues I might run into?
thx

When you create a custom query, you can use parameters to bind dynamic data. In there, you can use the Wappler cryptographic formatters.

There are no issues that does not have a workaround in our experience. But you will have to ask specifically if you are stuck.