Gå till slutet av bannern
Gå till början av bannern

Profylax_dos*månad

Hoppa till slutet på meta-data
Gå till början av metadata

Du visar en gammal version av den här sidan. Visa nuvarande version.

Jämför med nuvarande Visa sidhistorik

« Föregående Version 4 Aktuell »

Användaren ville kunna multiplicera samt addera resultat. Dock kan en beräkning bara ha ett svar så här får man skapa 4 beräkningar.

I demo-miljön finns en mall med 4 decimaltal (profylax_dos, manad1, manad2 och manad3). Mallen innehåller 4 beräkningar, se skärmbilder.

Här är koden om någon vill använda copy-paste.

when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad1") != null)
then
  outcome.set(questions.get("profylax_dos") * questions.get("manad1"));
end
when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad2") != null)
then
  outcome.set(questions.get("profylax_dos") * questions.get("manad2"));
end
when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad3") != null)
then
  outcome.set(questions.get("profylax_dos") * questions.get("manad3"));
end
when
  questions: Questions()
  eval(questions.get("profylax_dos") != null)
  eval(questions.get("manad1") != null)
  eval(questions.get("manad2") != null)
  eval(questions.get("manad3") != null)
then
  outcome.set(
      questions.get("profylax_dos") * questions.get("manad1") +
      questions.get("profylax_dos") * questions.get("manad2") +
      questions.get("profylax_dos") * questions.get("manad3")
  );
end

  • Inga etiketter