How to achieve standard comma filter in dialog ?

In standard we filter multiple values for a single field by comma.

For e.g in purchase order details->filter by field 1000001,1000002

But in my case in dialog i have item lookup so based on itemid my report is getting filtered.

But when i give multiple values by comma in lookup like 1000001,1000002, report is showing empty.

Is it possible in lookup ?

Yes, It is.

You can write the query and can use the range something like this:

mainQbd = main.addDataSource(tablenum(InventItemGroup));

if (ItemGroupIdValue)


mainGroupIdQbr = mainQbd.addRange(fieldnum(InventItemGroup, ItemGroupId));




This option is enabled only through queries.

You can achieve this providing ranges( instead of code.)

Add a datatsource of inventtable for that report,

and in the ranges of that datasource add a new field Item id.(to create a new range)

and in the value property of that range provide “1000001,1000002” for two records…

for multiple records use “1000001…1000010” same as standard report.

The usual way how to deal with this problem is using query, not individual fields in the dialog. You’ll press Select button in the dialog and set filters as usual in SysQueryForm. This is supported by reports too - and widely used.

Hi Vishal,

I made it Interactive No instead as per requirement i added fields like from date , to date ,itemid,itemgroup into dialog form.

So in dialog form i have itemid lookup.getfromdialog() i am taking this itemid value.

If am seleting one item this is working,but if i put any item by comma e.g item1,item2 the it is showing report is empty.

Still i can’t understand…is that qury you specified will take these multiple values for itemid for filter ?

Multiple values from customized lookup in report will never work. instead you can take the datasource which contains item id field and assign it to your report. Then by default you get select button in report dialog and there you can specify multiple items then.

Hi Vishal

Thank you for the information that we can’t filter for multiple values in customized lookup

Removed datasources and redesigned the report using fetch method and the multple value filter issue got solved. No code for filter …rather it is working as in standard.