how can i detect the mode (on add/on edit) a form has been opened?

how can i detect the mode (on add/on edit) a form has been opened?

Hello,
I have a form where I have some fields with user input actions. 
What I would like to do is to have that behave differently for an On Add than for an On Edit.
Is there a way (a system variable?) to detect if the form has been opened in an On Add or On Edit mode?
Greetings
Rob