0
alert, dialog, notify - ich brauche Bio Intelligenz
Ich habe ein Problem mit alert. Nachdem ich noun schon einige Zeit mit chatgpt , copilot und gemini verbracht habe, freue ich mich über den Hinweis von gemini, dass ich doch besser die community fragen soll. Ninox sei zu speziell :-D. Hier also mein irgendwo fehlerhafter Code: Es sendet nur, wenn ich die alert-Zeilen rausnehme. Ich erhalte immer "Ende erwartet Zeile xx, Spalte xx . Immer in der ersten Zeile, die alert enthält. Oder dialog oder notify ...
let empfaenger := (select Stammdaten where Name = "N.N." and eMail != null);
if count(empfaenger) > 0 then
for p in empfaenger do
sendEmail({
from: "xxxxxxxxxxxxxxxx@nxdb.tech",
to: p.eMail,
subject: "Wichtige Information für den Betriebsrat",
text: "Hallo " + p.Vorname +
",\n\nhier kommt eine wichtige Information für unsere Gremienarbeit.\n\nViele Grüße",
html: "<html><body><h3>Hallo " + p.Vorname +
"</h3><p>hier kommt eine wichtige Information für unsere Gremienarbeit.</p><p>Viele Grüße</p></body></html>"
})
end
alert("E-Mails wurden erfolgreich versendet!");
else
alert("Keine Empfänger gefunden.");
end
1 reply
-
There should be a semicolon ( ; ) after the end (line 13) that is right before the first alert.
let empfaenger := (select Stammdaten where Name = "N.N." and eMail != null); if count(empfaenger) > 0 then for p in empfaenger do sendEmail({ from: "xxxxxxxxxxxxxxxx@nxdb.tech", to: p.eMail, subject: "Wichtige Information für den Betriebsrat", text: "Hallo " + p.Vorname + ",\n\nhier kommt eine wichtige Information für unsere Gremienarbeit.\n\nViele Grüße", html: "<html><body><h3>Hallo " + p.Vorname + "</h3><p>hier kommt eine wichtige Information für unsere Gremienarbeit.</p><p>Viele Grüße</p></body></html>" }) end; <--- alert("E-Mails wurden erfolgreich versendet!"); else alert("Keine Empfänger gefunden."); end
on a side note: modified ChatGPT with Ninox so you can try it out the next time you need help. While it is better, it is not as good as the forums. :)
Content aside
- 4 days agoLast active
- 1Replies
- 26Views
-
2
Following