cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SteepM
Frequent Visitor

Inserting SQL row - increments the ID that I am parsing by random values

Hi,

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: 

SteepM_0-1611072598132.png

SteepM_1-1611072680177.png


And this is the Input for ID from a recent Successful run:

SteepM_2-1611072862382.png

 

THIS IS THE OUTPUT OF ID AFTER INSERTION:

SteepM_3-1611072923702.png


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!

5 REPLIES 5
Pstork1
Dual Super User
Dual Super User

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
SteepM
Frequent Visitor

It is the PK Column named ID as a bigint. 

I changed it to nvarchar column as you mentioned but still did the same thing.
INPUT:

SteepM_0-1611073778764.png

OUTPUT:

SteepM_1-1611073819013.png

 



Pstork1
Dual Super User
Dual Super User

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
SteepM
Frequent Visitor

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. .


SteepM_0-1611114626615.png

 

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.


SteepM
Frequent Visitor

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

 

 

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,135)