Identity available, but not to Update DB

Hello! :slight_smile:

The identity from my Database Insert is being passed along in my Server Action Workflows.
I can see it in a variable, I can use to query the database, etc.
But, whenever I update the database with it, it says the value is null.

Why is it null? Why can’t I update the database record that I just created?

What gives? Thank you!

SCREEN SHOTS TO HELP BE MORE CLEAR, if you want them







(fyi, I already fixed the wrong security step in there) :wink:

What do you have in the update step?

I update the same table with a condition to update the Expense_ID that the Database Inserted and returned.

Yes, I assigned the value IDENTITY from the database insert to a variable/value called InsertIDOfPictureInfo.

I’m only using that value because it wasn’t working connecting straight to the DB before, either, and I read in the forum this was the proper way to do get a value back to the user side, so I thought I’d try it.
But, the value clearly has the correct value (see above picture) so it should work.

LOL Except I’m apparently missing something.

And here is a picture of the Database showing that Expense_ID is the first column (it is auto-incremented)
image

This is exactly what is expected, i think you just misunderstand what the output means
The details i highlight are the results OUTPUT from the Update action specifically.


In an update no new identify is allocated as no new record is created so it is null, affected is set to 1 to show 1 record has been updated. I guess the problem lies elsewhere

I thought it might be expected to receive that particular return.

I had mentioned (on one of the white images) that I also confirm this identity variable from the DB insert isn’t being passed or working because if I use the identity in my database update, the database won’t update, but if I just use the filename the update works fine.

Of course, I want the identity because someday there could be a duplicate filename.

So, why isn’t that identity working, or why doesn’t it work with the update?

From the response, something is being updated or affected would not be 1. Do you know what?
Can we see the columns and values tab of the update action?

1 Like

Sure!

OH THANK YOU!!!

You made me realize it was updating because the affected = 1.

So, I went back and realized that somehow my api name got changed and I didn’t change it in the update.
:woozy_face: :woozy_face: :woozy_face:

It works now, thanks!!!

1 Like