Set Default Value for Global Variable In Grid

Hi All,

I created a grid with the sql query below

"SELECT
id,
Branch,
SerialNo,
Model,
Type,
MachineNo,
DODate,
Entitlement,
ServiceInterval,
CustCode,
LastSvcDate,
Mcondition,
Mstatus,
ArrivalDate
FROM
machine_details
where mstatus = “S” and month(date_add(LastSvcDate,INTERVAL ServiceInterval DAY)) = [servicedate] "

How can i set a default value for my [servicedate] global variable in order for the grid to start and everytime refresh the grid by clicking on custom button which will pass a value to my global variable?

In event OnapplicationIni: This event occurred before the application execute the SQL, and execute only once. Is used to do verifications of variables, and security verifications.

Thanks alvagar, it works.