I made a new form and add grid. Add Datasource to grid to show records but I want to show all records without Enum::No so (All Records - Enum Value No One)
Thanks
You need overwrite the init
method of your datasource and add this
Option 1
this.query().dataSourceTable(tablenum(YourDataSource)).addRange(fieldnum(YourDataSource, YourField)).value(strfmt('!%1',enum2str(YourEnum::YourOption)));
Option 2
this.query().dataSourceTable(tablenum(YourTable)).addRange(fieldnum(YourTable, YourField)).value(enum2Str(Enum::Yes));
I wrote this in the init method of Form
MYTABLE_ds.query().dataSourceTable(tableNum(MYTABLE)).addRange(fieldNum(MYTABLE,MYFİELD)).value(strFmt("!%1",enum2str(ENUM::No)));
This solution worked too
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.