Filter query on form with View as data source


I have created form with using View. I want set filter on data source of the form.

for ex. this.query().dataSourceTable(tableNum(“ItemInventory”)).addRange(fieldNum(ItemInventory,ItemId)).value(itemId);

How to do it in case for View as a data source?

Please help.


Same way you can use view name replace of table name. whats wrong in this?

Ohh! Thanks! It’s working