Modified is not working for Date field ?

As my datasource doesn’t contain any date field I added a DateEdit control to Design and wrote some code in it’s modified field so that when i’ll enter some date value the form filters.

By debugging i came to know that it’s modified field method is not triggering at all.

Is there any solution for it ?

The other way of doing it is…

use edit method for the date field.(see InventQuarantineOrder form - showComplete method)

add a range to the data source (based on which you want to filter)

in the executeQuery() method of the data source - give value to the range(the value entered in the edit field).

Thanks Kranti for your quick response.Can u plz explain me in detail.

Actaully i have a form which displays some dates in the grid from the table.

And above the grid dateedit control is there so i want…when i’ll select some date in that date control my form’s grid automattically should filter.

Can u plz tell me " can edit method solve this problem ?" if yes then where i’ll put that ?

create a date variable in class declaration of the form.

TransDate dateEdit;

QueryBuildRange showDate;

Write an edit method like

//BP Deviation documented

edit TransDate DateSelect(boolean set, TransDate _dateSelected)

{

if (set)

{

dateEdit = _dateSelected;

yourTable_ds.executeQuery();

}

return dateEdit;

}

Add this method to the Date Edit Control in the form Design.

Now in the init() method of the data source add this date field as range

showDate = this.query().dataSourceTable(tablenum(YourTable)).addRange(fieldnum(YourTable,DateField));

in the executeQuery() method provide value to the range before super();
showDate .value(QueryValue(DateEdit));