Form application. Insert mode / Update mode

what is the best way to understand if a form app is open in update mode or insert mode ?
At the moment I am checking if field containing primary is empty or not , but it’s not always the best solution because the field can be populated and I can still be in Insert mode.
Is there a macro for it or some other trick ?