Rule on date now() +9

16 views
Skip to first unread message

Harry Contos

unread,
Jan 18, 2026, 2:34:20 PM (10 hours ago) Jan 18
to memento...@googlegroups.com
Hello, i've attached a screenshot of a rule that i'm trying to get to work for updating a record.
The purpose is that when I change a field that is called Priority to High. It should automatically sets the due date plus I9 days from today. Everything i've seen so far, says it should work by using the now() +9 But I keep getting an error.

org.mozilla.javascript.EcmaError: TypeError: Can't set value 'now() + 9' to field Due Date Old : Unparseable date: "now()" (Trigger 5.js#5)

Thanks,
Harry
AISelect_20260118_111918_Memento Database.jpg

Er Mo

unread,
Jan 18, 2026, 3:27:04 PM (9 hours ago) Jan 18
to mementodatabase
Hallo
Wandle die Regel in ein Skript um und Poste dieses . Glaube das die regel einen Fehler macht .

Hello, please convert the rule into a script and post it. I think the rule is making a mistake.

Ernst

Harry Contos

unread,
Jan 18, 2026, 3:42:58 PM (8 hours ago) Jan 18
to Er Mo, mementodatabase
I was trying to use the rules and not a script.
.
But here is a JS i would use as a Trigger in scripts. 

var e = entry();

// Only run if Priority is High AND Due Date is empty
if (e.field("Priority") === "High" && !e.field("Due Date")) {

    var d = new Date();
    d.setDate(d.getDate() + 9);

    // Strip time (date-only field)
    var dateOnly = new Date(d.getFullYear(), d.getMonth(), d.getDate());

    e.set("Due Date", dateOnly);
}
 Thanks 

Thanks,
Harry

From: memento...@googlegroups.com <memento...@googlegroups.com> on behalf of Er Mo <ernst...@gmail.com>
Sent: Sunday, January 18, 2026 12:27:03 PM
To: mementodatabase <memento...@googlegroups.com>
Subject: Re: Rule on date now() +9
 
--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mementodatabase/89148b19-cd3a-4bf1-a6eb-fd6efafc303dn%40googlegroups.com.

Harry Contos

unread,
Jan 18, 2026, 3:54:32 PM (8 hours ago) Jan 18
to Er Mo, mementodatabase
I was trying to use the rules and not a script. I just thought a rule would be simpler. 

Er Mo

unread,
Jan 18, 2026, 4:04:55 PM (8 hours ago) Jan 18
to mementodatabase
Hallo
Der Fehler ist in der 5 Zeile . Was steht in der 5 Zeile ? Ich wieß nicht wie man das einsehen kann ohne es in ein Skript umzuwandeln .

Hello

The error is in line 5. What does line 5 say? I don't know how to see it without converting it into a script.

Ernst

Mmm

unread,
Jan 18, 2026, 5:54:11 PM (6 hours ago) Jan 18
to mementodatabase
В триггере вместо задачи "Обновить поле" можете использовать задачу "Скрипт" (вкладка задач Дополнительно).

let date = moment().add(9,'d').format('DD.MM.YYYY'); 

entry().set('Due Date', date);


понедельник, 19 января 2026 г. в 00:04:55 UTC+3, ernst...@gmail.com:
Scr_1.png
Reply all
Reply to author
Forward
0 new messages