Multiple choices

Hello, I have issue creating a snippet testing multiple conditions. What AM I doing wrong, please??

// Selection de la taille
{formmenu: name="Taille"; default="< 1 cm"; "< 1 cm"; "≥ 1 cm"}

// Selection de la palpabilite
{formmenu: name="Palpabilite"; default="Non"; "Non"; "Oui"}

// Selection de la presence de liquide
{formmenu: name="Liquide"; default="Non"; "Non"; "Oui, liquide clair"; "Oui, liquide pus"}

// Selection de la localisation
{formmenu: name="Localisation"; default="Epiderme/derme superficiel"; "Epiderme/derme superficiel"; "Derme/hypoderme"}

// Determination du type de lesion
{if: Taille="< 1 cm" AND Palpabilite="Non" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Macule{endif}
{if: Taille="≥ 1 cm" AND Palpabilite="Non" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Tache{endif}
{if: Taille="< 1 cm" AND Palpabilite="Oui" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Papule{endif}
{if: Taille="≥ 1 cm" AND Palpabilite="Oui" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Plaque{endif}
{if: (Taille="< 1 cm" OR Taille="≥ 1 cm") AND Palpabilite="Oui" AND (Liquide="Non" OR Liquide="Oui, liquide clair") AND Localisation="Derme/hypoderme"}Nodule/Tumeur{endif}
{if: Taille="< 1 cm" AND Palpabilite="Oui" AND Liquide="Oui, liquide clair" AND Localisation="Derme/hypoderme"}Vesicule{endif}
{if: Taille="≥ 1 cm" AND Palpabilite="Oui" AND Liquide="Oui, liquide clair" AND Localisation="Derme/hypoderme"}Bulle{endif}
{if: (Taille="< 1 cm" OR Taille="≥ 1 cm") AND Palpabilite="Oui" AND Liquide="Oui, liquide pus"}Pustule{endif}

Hi @Richard_T Welcome to the forum! :slight_smile:

Try this:

// Selection de la taille
{formmenu: name=Taille; default=< 1 cm; < 1 cm; ≥ 1 cm}

// Selection de la palpabilite
{formmenu: name=Palpabilite; default=Non; Non; Oui}

// Selection de la presence de liquide
{formmenu: name=Liquide; default=Non; Non; Oui, liquide clair; Oui, liquide pus}

// Selection de la localisation
{formmenu: name=Localisation; default=Epiderme/derme superficiel; Epiderme/derme superficiel; Derme/hypoderme}

// Determination du type de lesion
{if: Taille="< 1 cm" AND Palpabilite="Non" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Macule
{elseif: Taille="≥ 1 cm" AND Palpabilite="Non" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Tache
{elseif: Taille="< 1 cm" AND Palpabilite="Oui" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Papule
{elseif: Taille="≥ 1 cm" AND Palpabilite="Oui" AND Liquide="Non" AND Localisation="Epiderme/derme superficiel"}Plaque
{elseif: (Taille="< 1 cm" OR Taille="≥ 1 cm") AND Palpabilite="Oui" AND (Liquide="Non" OR Liquide="Oui, liquide clair") AND Localisation="Derme/hypoderme"}Nodule/Tumeur
{elseif: Taille="< 1 cm" AND Palpabilite="Oui" AND Liquide="Oui, liquide clair" AND Localisation="Derme/hypoderme"}Vesicule
{elseif: Taille="≥ 1 cm" AND Palpabilite="Oui" AND Liquide="Oui, liquide clair" AND Localisation="Derme/hypoderme"}Bulle
{elseif: (Taille="< 1 cm" OR Taille="≥ 1 cm") AND Palpabilite="Oui" AND Liquide="Oui, liquide pus"}Pustule{endif}

You don't need to supply quotation marks " when defining your formmenus. When I removed them then the snippet started working. Secondly, I changed your list of if blocks into if-elseif blocks, because I assume at one time only one condition can be true.

1 Like

Amazing!!! Thank you so much!!! :raised_hands: :raised_hands: