How to get the maximum value of a field in DataWindow?
DW_1.Describe ("Evaluate (Max (Max (Column for ALL), 1)")
The column name is used by your actual column name.
How can I filter out a record of a certain field?
String ls_sql
LS_SQL = "Isnull (Accountant)
-------------------------------------------------- -------------
dw.setfilter ("Isnull (ccount)")
dw.filter ()
-------------------------------------------------- -------------
Comprehensive one:
String ls_sql
LS_SQL = "Isnull (Accountant) or Ltrim (RTRIM (Accountant)) = ''
dw.setfilter (ls_sql)
dw.filter ()
In addition to the loop, there is a row in the selected state in the statistics window?
Generally habitually accustomed to using the loop to the number of rows in the selected state in the data window, is there a better way? In fact, this issue is not used in the application, discussing, active thinking is still good.
method one:
Long Ll_Selected
LL_Selected = long (dw_1.describe ("Evaluate (IF (ISSelected (), 1, 0) for ALL) ', 1)"))
Method Two:
Long Ll_Selected
LL_Selected = long (DW_1.Describe ("Evaluate ('count (isselected () for all), 1)"))
How to make a clear and new record help in the DataWindow have been very clear, use
DWControl.getItemStatus (Long Row, String Column, Dwbuffer Dwbuffer)
Loop, for record status:
NOTMODIFIED! (There is no modification),
DataModified! (Has been modified),
New! (New, no assignment),
NewModified! (New, assignment) to determine.
How do I know the parent name of a control?
Suppose CB_1 inherits from UO_USER
Classdefinition L1
L1 = cb_1.classdefinition
MessageBox ("Calss Name of CB_1 'AnceStor", L1.anceStor.name)
-------------------------------------------------- -------------
You can also get a more late inheritance:
L1.ancestor.anceStor.name
Get the window where the control is located and its ancestor window name:
L1.ParentClass.Name and L1.ParentClass.Ancestor.name
Get the type of control:
L1.Dattypeof