Question

I'm trying to filter the table by the field "LanguageId" to show only "fr". I made a new method in my form datasource Here is my code

    public void filtr()
{
    DirPartyTable _dirPartyTable;
    select LanguageId from _dirPartytable
       where _dirPartyTable.LanguageId == "fr";
}

When running this code nothing happens. How to invoke it to work?

Was it helpful?

Solution

You can overwrite the init method of the DirPartyTable datasource and add this code to add a range on languageId with value "fr":

SysQuery::findOrCreateRange(this.query().dataSourceTable(tableNum(DirPartyTable)), fieldNum(DirPartyTable, LanguageId)).value("fr");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top