I'm using Crystal XI
Looking to use my array values to look up and return descriptions instead of the codes stored.
Here is a sample of the values captured from a multiselect box.
Field value: PacerIcddibMurmerPalpAnginaNote
My array : Pacer,Icddib,Murmer,Palp,Angina,Note
Need to end up with:
Pacemaker, ICD - Defibrilator, Murmur, Palpitations, Chest Pain, See comment
(stored in a table called "legendchoice", with code and name)
legendchoice table sample
code name
Pacer Pacemaker
Icddib ICD - Defibrilator
This is how I created the array:
stringVar strInput := {casevisitresultlistwt.result_value};
numberVar i;
stringVar strOutput;
strOutput :=strInput[1];
for i := 2 to len(strInput) do
(
if asc(strInput) = asc(ucase(strInput)) then
strOutput := strOutput & "," & strInput
else
strOutput := strOutput & strInput
);
strOutput;
Any suggestions on how to take the pieces of the array and return the names instead of the codes?
Thanks in advance. Sorry if the answer is in this forum, I tried to find what I needed before posting.
(my array coding doesn't allow for any numbers to be part of the codes. Current data set that is not an issue, but it could be in the future so if anyone has ideas feel free to let me know if I could have done this a better way)
Thanks again
Looking to use my array values to look up and return descriptions instead of the codes stored.
Here is a sample of the values captured from a multiselect box.
Field value: PacerIcddibMurmerPalpAnginaNote
My array : Pacer,Icddib,Murmer,Palp,Angina,Note
Need to end up with:
Pacemaker, ICD - Defibrilator, Murmur, Palpitations, Chest Pain, See comment
(stored in a table called "legendchoice", with code and name)
legendchoice table sample
code name
Pacer Pacemaker
Icddib ICD - Defibrilator
This is how I created the array:
stringVar strInput := {casevisitresultlistwt.result_value};
numberVar i;
stringVar strOutput;
strOutput :=strInput[1];
for i := 2 to len(strInput) do
(
if asc(strInput) = asc(ucase(strInput)) then
strOutput := strOutput & "," & strInput
else
strOutput := strOutput & strInput
);
strOutput;
Any suggestions on how to take the pieces of the array and return the names instead of the codes?
Thanks in advance. Sorry if the answer is in this forum, I tried to find what I needed before posting.
(my array coding doesn't allow for any numbers to be part of the codes. Current data set that is not an issue, but it could be in the future so if anyone has ideas feel free to let me know if I could have done this a better way)
Thanks again