I would like to know if there's a way to dynamically transform valuesets values labels as an Array.
By example, for theses in a checkbox item, HA7_ENERGIES_UTILISEES_PR_CUISSP
Propa'n P/
Gaz blan G/
Chabon C/
Bwa B/
Kouran K/
Kouran PIC E/
Kouran leta D/
Lot L/
Pa gen repons DK
Kesyon sa pa ka aplike NA
could be: array string HA7_ENERGIES(10): "P/","G/","C/","B/","K/","E/","D/","L/",DK"","NA";
It will be used in a dynamic function able to getlabel for checkbox.
Code: Select all
function string multipleLabel (string questionMultipleDictionaryNamee, string arrayName)
string labelMultiple = "";
do ctr = 2 {size (arrayName)} while ctr <= 11{length(arrayName)}
if (pos(arrayName(ctr),questionMultipleDictionaryName)) <> 0 then
if length(labelMultiple) > 0 then
labelMultiple = labelMultiple + " ";
endif;
labelMultiple = labelMultiple + getlabel(questionMultipleDictionaryName, arrayName(ctr));
endif;
enddo;
multipleLabel=labelMultiple;
end;