I am trying to create a dynamic drop down list based on a value chosen in a variable from another field.
Basically:
Var 1: Colonoscopy, Mammogram
Var 2: if colonoscopy = "blah, blah, blah"
if mammogram = "blah, blah, blah"
I can't seem to get the MEL right to make this happen. Does anyone have an example they could share with me?
Thanks, Michael
Here's an example. Write your condition in the MEL Expression field. Yours might be {if document.var1 == "Colonoscopy" then "blah, blah, blah"
else if document.var1 == "Mammogram" then "c,c,c"
etc.
{if (match(DOCUMENT.MROBILLCODE,
"205") > 0 or match(DOCUMENT.MROBILLCODE, "207") > 0) and DOCUMENT.PHPPROGDAY == "Monday"
then
"Goal Setting, Group Therapy, Community Group, Cognitive Behavioral Therapy, Interpersonal Relationships"
else if (match(DOCUMENT.MROBILLCODE,
"206") > 0 or match(DOCUMENT.MROBILLCODE, "208") > 0)and DOCUMENT.PHPPROGDAY == "Monday"
then
"Community Building, Mental Health Concepts 1, Strategies for Living, Group Therapy"
else if (match(DOCUMENT.MROBILLCODE,
"205") > 0 or match(DOCUMENT.MROBILLCODE, "207") > 0) and DOCUMENT.PHPPROGDAY == "Tuesday"
then
"Co-Dependency, Group Therapy, Community Group, Mental Health Concepts 1, Communications"
else if (match(DOCUMENT.MROBILLCODE,
"206") > 0 or match(DOCUMENT.MROBILLCODE, "208") > 0)and DOCUMENT.PHPPROGDAY == "Tuesday"
then
"Community Building, Communication, Cognitive Behavioral Therapy, Group Therapy"
else if (match(DOCUMENT.MROBILLCODE,
"205") > 0 or match(DOCUMENT.MROBILLCODE, "207") > 0) and DOCUMENT.PHPPROGDAY == "Wednesday"
then
"Psychodrama, Group Therapy, Community, Medication Education, Mindfulness"
else if (match(DOCUMENT.MROBILLCODE,
"206") > 0 or match(DOCUMENT.MROBILLCODE, "208") > 0)and DOCUMENT.PHPPROGDAY == "Wednesday"
then
"Community Building, Mind Over Mood, Mental Health Concepts 2, Group Therapy"
else if (match(DOCUMENT.MROBILLCODE,
"205") > 0 or match(DOCUMENT.MROBILLCODE, "207") > 0) and DOCUMENT.PHPPROGDAY == "Thursday"
then
"Mind Over Mood, Group Therapy, Community, Coping Skills, Self-Awareness"
else if (match(DOCUMENT.MROBILLCODE,
"206") > 0 or match(DOCUMENT.MROBILLCODE, "208") > 0)and DOCUMENT.PHPPROGDAY == "Thursday"
then
"Community Building, Goal Setting, Group Therapy"
else if (match(DOCUMENT.MROBILLCODE,
"205") > 0 or match(DOCUMENT.MROBILLCODE, "207") > 0) and DOCUMENT.PHPPROGDAY == "Friday"
then
"Mental Health Concepts 2, Group Therapy, Community, Assertiveness Training, Weekend Planning & Wrap-up"
else
""
endif
endif
endif
endif
endif
endif
endif
endif
endif
}