Filtering Records in Grid

Hi All,

I have a form which has a field “Posted” which is type “NoYes”.And i have a filter field of type “AllOpenPosted”(combo box).

I want to filter records in such a way that when i select ‘Posted’ in the combo,the records whose “posted field” are checked should be displayed.

selecting ‘open’ in the combo, should display the records whose posted field are not checked.

I followed this link -…/hh745335.aspx

Unable to find which part i’m missing.Can anybody please help me .



Can you explain your problem and show us your implementation? Otherwise we can’t tell “which part you’re missing”.

Hi Martin,

Below is the form which i have created.

And following are the properties of ‘Combo box’ and ‘Posted’ field in table and form .

And i have followed the same steps in this link - How to: Add Filter Controls to a Simple List Form | Microsoft Docs

While specifying query,Is there a mis-match because the ‘Posted’ field is of type “NoYes”?

Can you show how you set the value of range?

Hi,This is the code which i have written

This code is wrong:


You want rather something like this (it should be self-explanatory):

switch (AllOpenPostedField.selection())
    case AllOpenPosted::All:
    case AllOpenPosted::Open:
    case AllOpenPosted::Posted:

Thanks Martin! It Works fine now.

I did the same earlier,but dint call the function in the appropriate place

Hi Rajarajeswari,

You can refer the form called “BankReconciliation” in Datasource init and executequery methods.

Thanks & Regards,

Britto John Baskar.A