How to build query range with if else conditions check for a field in the grid?

Hi All,

In ax 2009 I have form grid where it is display using query in form datasource init method, once the form opens on top I have a dateEdit field, when I select a date in the dateedit control my grid should get filtered like, if a particular field is empty in a record the range with date should not be applied but if the same field of a different record is not null the record should display only if its date field is less than dateedit range.

Thanks

Hi Gopinath,
First addrange to the datasource’s init method after that pass the value for this range using the excutequery method of same datasource and finally on modified event of the dateeditfield call the excutequery method.