Hello there Jake,
Hope you're doing well.
So, as far as I understood, the user clicks in a button to go to a Detail Screen. In that screen, the user will enter a text, which corresponds to a primary key for an entity.
As far as I can tell, you just need to call CreateOrUpdate<Entity> action and pass the primary key.

If this key doesn't exist in the database, a new record will be created. But if it does, it updates the existing record for that key.
Kind regards,
Rui Barradas