<< Click to Display Table of Contents >> Navigation: »No topics above this level« TOC : OZ e-Form Extension > OZ e-Form JavaScript API > Input > TextBox > Method >GetDataSetFREQ |
Gets the occurrence count of the given value from the given field.
Prototype :
integer GetDataSetFREQ
(
string FieldPath,
string Value,
[ string DistinctFieldName ],
[ string ConditionFieldName ]
)
Arguments :
FieldPath |
Field Path setup depends on the field type |
Value |
Value to count its occurrence |
DistinctFieldName |
Field name for deduplication |
ConditionFieldName |
Field name for search condition |
Reference :
Refer to GetDataSetValue function for how to set the field path.
Refer to GetDataSetSUM function for DistinctFieldName and ConditionFieldName.
When execute the function in a data band having group header/footer bands, group header/footer band, and a TextBox added to data sub-band, if the function use the dataset field of the band, the return value will may be different according to each band. To learn more, refer to description of GetDataSetFREQ of each band.
Example :
//Data field (ODI name : Sample, dataset name : Orders, field name : Price)
_TraceLn(This.GetDataSetFREQ("Sample.Orders.Price", "1000"));
//Data field (ODI name and dataset name can be omitted)
_TraceLn(This.GetDataSetFREQ("Orders.Price", "1000")); //omit ODI name
_TraceLn(This.GetDataSetFREQ("Price", "1000")); //omit ODI name and dataset name
//ODI parameter field (ODI name : Sample, ODI parameter field name : TotalAmount)
_TraceLn(This.GetDataSetFREQ("Sample.OZParam.TotalAmount", "1000"));
//ODI parameter field (ODI name can be omitted)
_TraceLn(This.GetDataSetFREQ("OZParam.TotalAmount", "1000"));
//form parameter field(form parameter field name : Quantity)
_TraceLn(This.GetDataSetFREQ("OZFormParam.Quantity", "1000"));
//Data field (specify DistinctFieldName)
_TraceLn(This.GetDataSetFREQ("Price", "1000", "Region"));
//Data field (specify ConditionFieldName)
_TraceLn(This.GetDataSetFREQ("Price", "1000", "", "Flag"));
//Data field (specify DistinctFieldName and ConditionFieldName)
_TraceLn(This.GetDataSetFREQ("Price", "1000", "Region", "Flag"));
Available Events :
OnBind, OnStartBind
See also :
GetDataSetSUM, GetDataSetValue