mercredi 1 juin 2011

How to add a range of value not null in a dataSource of a form

Here is the Key

this.query().dataSourceTable(tablenum(CustConfirmJour)).addRange(Fieldnum(CustConfirmJour,
thy_ProformaId)).value(sysquery::valueNotEmptyString());

It is better to add the range in the init method of the dataSource  because executequery is used after refresh,write, lots of events when you do it in init only one attempt you can target the bird.
In the executequery you disable the possibility that anyone can change it but in the init method, when you lock a range no body or action (refreshing or etc) can ruin your range
unless you dont use clearRanges() method of datasource for locking the range you can use status method of querybuildrange object.

qbr.status(RangeStatus::Locked);

Aucun commentaire:

Enregistrer un commentaire