Function Delay(&seconds As number, &BoId As number) Returns boolean;
;
&jCls = GetJavaClass("java.lang.Thread");
&WaitTill = AddToDateTime(%Datetime, 0, 0, 0, 0, 0, &seconds);
While &WaitTill > %Datetime
/*Check every one Second time*/
SQLExec("Select count(*) from Table ABC where COL= :1", &id, &IdCheck);
If &IdCheck> 0 Then
Return True;
Else
GetJavaClass("java.lang.Thread").sleep(2000); /*Sleep takes Millis.2000 millis equals 2 seconds*/
End-If;
End-While;
Return False;
End-Function;