How to determine it's 'Add' mode?

I have a script which should only execute during onLoad (add mode)
I need an IF ADD_MODE execute my custom code, else, it will execute twice in my Form app.

In the onload you have the macro:

Ex. 1:
if (sc_btn_new)
{
{My_Date} = date(‘Y/m/d’);
}

Thanks sir! it’s working!