ReverseLookUp
Reverse look up an index in this CategoricalMap and return its category.
string ReverseLookUp( int iVal )
Returns the category or text value in this CategoricalMap referred to by the index if found, or returns an empty string if it is not found.
EX1
void CategoricalMap_ReverseLookUp_ex1() { Worksheet wks; wks.Create(); if (wks) { Dataset ds(wks, 0); ds.SetSize(8); vector<string> vs = {"aaa","bbb","ddd","ccc","qqq","777","aaa","ddd"}; ds.PutStringArray(vs); string strWksColname = wks.Columns(0).GetName(); strWksColname = wks.GetPage().GetName() + "_" + strWksColname; StringArray vMyCatMap; CategoricalData cdMyCatData(strWksColname); vMyCatMap = (StringArray) cdMyCatData.Map; int index = cdMyCatData.Map.LookUp("ddd"); string strVal = cdMyCatData.Map.ReverseLookUp(5);//strVal="qqq" } }
Reverse look up an index (1 based offset) in this CategoricalMap and return its category (or text value). If the CategoricalMap has an associated CategoricalData data set the mapped index values in the CategoricalData data set refer to the text values in this CategoricalMap. For EX1, the index 5 refers to the text value "qqq".
CategoricalMap::LookUp
origin.h