سؤال

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?

هل كانت مفيدة؟

المحلول

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");
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top