You must satisfy the restraint pkey

Good morning and happy holidays,

I am trying to update a database table from a form, and once in a while I get the error message "you must satisfy the restraint shipping pkey". Can anyone tell me what this means?

I'm not getting everytime. I get it once and then try to submit the update again and it will go through the second time.

Can you share the table definition and the query being used to insert records? The error means that there is a constraint on the table (apparently called “shipping”) that isn’t being met. So perhaps the record being inserted is missing the primary key because whatever is populating that field hasn’t run?

Hello @jg80,

I am using the GUI to build the query to updated. Here is what that looks like:

I'm not sure what you mean by the table definition.

Are you using the retool DB? Just trying to figure out what the “shipping” restraint is defined as in the database.

Yes, I'm using the Retool Db.

For some reason it has been working again. I have not made any changes, it just started working again.

2 Likes

Hi @tomm, if you work on a team, is it possible that someone set a constraint and removed it? In any case, happy to hear this is working again!