I have a flow that from webhook json body, I extract values and want to insert row in SQL Server Database. I had many successful tries, but when I started setting up correct Keys and relations, I realized that the ID that I am parsing which is 15-16 digits number, is changed after it is Inserted as a Database row.
So this is the flow:
And this is the Input for ID from a recent Successful run:
THIS IS THE OUTPUT OF ID AFTER INSERTION:
As you can see only the last digit is changed. I tried so many things, and I can't think of any way to solve this. Also, on other Tables and other Flows, it is happening the same, the ID that I input is modified for + few digits.
Please share any info, Thanks!
What is the definition of the column in SQL? Is this an Identity column in SQL? If it is then SQL will generate a new number to make sure its unique. For this to work correctly the column needs to be a Nvarchar column.
I don't think you will be able to set the Primary Key for a record in a table. What you want is a Foreign key to an external table.
Then what is the usual way of inserting a row and keeping track of the ID?
In the Insert a Row flow, this is a required field. .
So I need to provide an ID, but then how would I keep track of the right Primary ID/key when the one that I am providing is being modified after insertion in a very weird way, only the last two/three digits are modified from a 16 digit number.
I also tried:
Updated the PK to Identity Column
Applied set identity insert to ON as explained in the docs.
I now tried to insert a row with an ID: 9497000000553110
From the output: The returned row after insertion now has ID: 9497000000553111
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
If you are a small business ISV/Reseller, share your thoughts with our research team.