Cascading From LGA to Settlements not displaying Value and labels of the Cascaded Fields
Posted: January 21st, 2021, 9:34 am
Dear CSPRO Community,
Am in need of urgent help to display values and Labels in the cascaded field. Am cascading the values of my unique identifier field LGA, District, Ward and Settlements using pre-loaded data. The logic below is displaying the Values and not the labels. I need to display both. For instance the logic for district is given below:
onfocus
locateThisGeoID = maketext("%v00000000", LGA);
idx = 1;
do while locate(ITC2021_GEOCODES_DICT,>,locateThisGeoID);
if retrieve(ITC2021_GEOCODES_DICT) then
if GEO_LGA = LGA then
vsCodes(idx) = GEO_DISTRICT;
vsLabels(idx) = maketext("District #%v", GEO_DISTRICT);
inc(idx);
endif;
locateThisGeoID = maketext("%v%v999999", GEO_LGA, GEO_DISTRICT);
endif;
enddo;
vsCodes(idx) = NotAppl;
setcapturetype(DISTRICT, 1); // make this a radio button
setvalueset(DISTRICT, vsCodes, vsLabels);
The logic Compiles fine and cascaded District code and Labels them as District1, District2 etc. Instead displaying the actual value labels. A copy of the program is attached.
Am in need of urgent help to display values and Labels in the cascaded field. Am cascading the values of my unique identifier field LGA, District, Ward and Settlements using pre-loaded data. The logic below is displaying the Values and not the labels. I need to display both. For instance the logic for district is given below:
onfocus
locateThisGeoID = maketext("%v00000000", LGA);
idx = 1;
do while locate(ITC2021_GEOCODES_DICT,>,locateThisGeoID);
if retrieve(ITC2021_GEOCODES_DICT) then
if GEO_LGA = LGA then
vsCodes(idx) = GEO_DISTRICT;
vsLabels(idx) = maketext("District #%v", GEO_DISTRICT);
inc(idx);
endif;
locateThisGeoID = maketext("%v%v999999", GEO_LGA, GEO_DISTRICT);
endif;
enddo;
vsCodes(idx) = NotAppl;
setcapturetype(DISTRICT, 1); // make this a radio button
setvalueset(DISTRICT, vsCodes, vsLabels);
The logic Compiles fine and cascaded District code and Labels them as District1, District2 etc. Instead displaying the actual value labels. A copy of the program is attached.