Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field that comes from multiple option data. The multiple options have been combined into one field with the responses separated by spaces. For example,
1 Pain FirstAid Medicine
2 FirstAid
3 Pain Medicine
4 Pain ReferGP
I would like to create a list box with the four values Pain, FirstAid, Medicine, ReferGP and then by clicking on one of the options select all records with that particular value. For example by selecting Pain, records 1,3 and 4 would be selected, by selecting Medicine records 1 and 3 would be selected.
Does anyone know how I can do this? I have played around with list boxes without much success.
You need to include the source field (Outcome) to provide linkage.
Load
Outcome,
subfield(Outcome,' ') as OutcomeItem
RESIDENT Raw_Data;
-Rob
It's probably easiest if you separate the treatments into distinct items using subfield():
LOAD
*
,subfield(Treatments, ' ') as TreatmentItem
Inline [
RecID, Treatments
1, Pain FirstAid Medicine
2, FirstAid
3, Pain Medicine
4, Pain ReferGP
]
;
Then create a listbox for TreatmentItem.
-Rob
Hi,
Use this script
Load FieldName,SubField(FieldName,' ') as Keyword Inline [
FieldName
Pain FirstAid Medicine
FirstAid
Pain Medicine
Pain ReferGP ];
Thanks for the prompt reply. I tried the following
Load
subfield(Outcome,' ') as OutcomeItem
RESIDENT Raw_Data;
and it created the fields okay but when the list box is created the selections do not work. The link to the original data seems to have gone. Any suggestions?
You need to include the source field (Outcome) to provide linkage.
Load
Outcome,
subfield(Outcome,' ') as OutcomeItem
RESIDENT Raw_Data;
-Rob
Thanks Rob. That works.