When you write an iff statement off a list you can do if: x <> y then out put z.
How do you do this if the pick list is a pick multiple items?
The syntax <> does not work the same when using it for a pick multiple list.
{=includes(`Medications'` <> "Zenequin")"
scott
October 22, 2024, 1:41pm
2
Hi Geoff,
It sounds like you want something like this:
Selection: {formmenu: Red; Green; Blue; multiple=yes; name=colors}
"Red" is selected: {=includes(colors, "Red")}
"Red" is not selected: {=not includes(colors, "Red")}
Does that help?
Hey Scott, I think I am not using it correctly. Here is the snip it I am trying to make work.
{note}{formtoggle: name=Medications; default=yes}{formmenu: None; Miralax; Lactulose; Cisapride; Cerenia; Mirataz; Metronidazole; Fortiflora; Gabapentin Liquid; Gabapentin Cap; Prednisolone Tabs; Prednisolone Liquid; name=Medications'; cols=20; multiple=yes}{endformtoggle}{endnote: trim=yes}{if: medications = "Yes"}{note: preview=no; insert=yes}Medications:{endnote}{endif}{if: includes(Medications'
, "None")}
None{endif}{if: includes(Medications'
, "Miralax")}
{import: #miralax }{endif}{if: includes(Medications'
, "Lactulose")}
{import: @lactulose }{endif}{if: includes(Medications'
, "Cisapride")}
{import: @cisapride }{endif}{if: includes(Medications'
, "Cerenia")}
{import: @maropitant }{endif}{if: includes(Medications'
, "Mirataz")}
{import: @mirataz }{endif}{if: includes(Medications'
, "Fortiflora")}
{import: @catfortiflora }{endif}{if: includes(Medications'
, "Metronidazole")}
{import: @lmetronidazole }{endif}{if: includes(Medications'
, "Gabapentin Liquid")}
{import: @lgabapentin }{endif}{if: includes(Medications'
, "Gabapentin Cap")}
{import: @gabapentin }{endif}{if: includes(Medications'
, "Prednisolone Tab")}
{import: @prednisolone }{endif}{if: includes(Medications'
, "Prednisolone Liquid")}
{import: @lprednisolone }{endif}{if: not includes(Medications'
, "None")}
If vomiting, diarrhea, or decreased appetite occurs please STOP medication and call for advice. {endif}
I am trying to get the last line "If vomiting, diarrhea, or decreased appetite occurs please STOP medication and call for advice." to pop up if I select any medication that is not "None"
scott
October 22, 2024, 2:26pm
4
So that is a little trickier, but I've implemented an example of how to do it with our colors case here:
Selection: {formmenu: None; Red; Green; Blue; multiple=yes; name=colors}
"Red" is selected: {=includes(colors, "Red")}
"Red" is not selected: {=not includes(colors, "Red")}
{if: count(colors) > 1 or (count(colors) = 1 and not includes(Colors, "None"))}
You selected a color that wasn't "None"!
{endif}
Thank you for this! Solves the problem!