<< Click to Display Table of Contents >> Navigation: »No topics above this level« TOC : Script API > JavaScript > JavaScript API > Component > Band > DummyHeaderBand > Method >GetDataSetCNT |
Gets the number of dataset rows.
Prototype :
double GetDataSetCNT
(
string DataSetPath,
[ string DistinctFieldName ],
[ string ConditionFieldName ]
)
Arguments :
DataSetPath |
DataSet Path in the form of "ODI name.dataset name" |
DistinctFieldName |
Field name for deduplication |
ConditionFieldName |
Field name for search condition |
Reference :
Refer to GetDataSetSUM function for using DistinctFieldName and ConditionFieldName.
When execute the function in a data band having group header/footer bands, group header/footer band, data header/footer band and dummy header/footer band added to data sub-band, if the function use the dataset field of the band having dummy header/footer band, the return value will be different according to the bands. To learn more, refer to description of GetDataSetSUM of each band.
Example :
//ODI name : Sample, dataset name : Orders
_TraceLn(This.GetDataSetCNT("Sample.Orders"));
//specify DistinctFieldName
_TraceLn(This.GetDataSetCNT("Sample.Orders", "Region"));
//specify ConditionFieldName
_TraceLn(This.GetDataSetCNT("Sample.Orders", "", "Flag"));
//specify DistinctFieldName and ConditionFieldName
_TraceLn(This.GetDataSetCNT("Sample.Orders", "Region", "Flag"));
Available Events :
OnBind, OnStartBind
See also :