ReferenceError "" Is not defined

216 views
Skip to first unread message

Sebastian Amigon

unread,
May 3, 2021, 11:08:20 AM5/3/21
to mementodatabase
Hi.
I have a problem, I hope you can help me. It happens that I have a script that is executed when I update a field in the list of entries, the strange thing and that I do not know why it gives the error is that in the desktop version it works correctly but in the mobile version it shows me the error " ReferenceError "Customer name" is not defined "

Er Mo

unread,
May 3, 2021, 1:21:20 PM5/3/21
to mementodatabase
Hallo
Dein Fehler liegt daran dass es zwei verschiedene Programme sind , die auf die selben Daten zugreifen . In der PC Version findet Memento das Feld vom Eintrag ,in der Mobilen Version nicht . Ist warscheinlich das das Skript zu falschen Zeit aufgerufen wird . Versuchen mal " Nach den Speichern " .

Hello
Your mistake is because there are two different programs accessing the same data. In the PC version, Memento finds the entry field, but not in the mobile version. It is likely that the script is called at the wrong time. Try "after saving".

Sebastian Amigon

unread,
May 3, 2021, 1:34:53 PM5/3/21
to mementodatabase
Hi!
Thank you very much for answering, exactly, in fact it was already "After saving".
The script / trigger sends an email when I update a field, as it said in the pc version if it sends the email with the information of the library entries, but not on mobile. I am using the event "Updating a field", before I used "Updating an entry" and with that event the email was sent on mobile but that event does not serve me for spam reasons

Bill Crews

unread,
May 3, 2021, 1:37:06 PM5/3/21
to Sebastian Amigon, mementodatabase
I'm not sure. Do you think you might have tried to reference "Customer name" as a variable or function or whatever? Do you do a ...
var Customer name = "Google";
... or even ...
var "Customer name" = "Mozilla";
... or ...
"Customer name".set(fieldname, value); // This is more likely
...?
The point is that it's looking for something like a variable name or a function or method name and is surprised to find this text string literal instead. Whenever it refers to something being "not defined", it thinks that thing is a variable or a function or method, because those things require definition.

On Mon, May 3, 2021, 11:08 Sebastian Amigon <seb.f...@gmail.com> wrote:
Hi.
I have a problem, I hope you can help me. It happens that I have a script that is executed when I update a field in the list of entries, the strange thing and that I do not know why it gives the error is that in the desktop version it works correctly but in the mobile version it shows me the error " ReferenceError "Customer name" is not defined "

--
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 on the web visit https://groups.google.com/d/msgid/mementodatabase/ae8ee6aa-8671-4fc7-95a8-1d8556daea8cn%40googlegroups.com.

Sebastian Amigon

unread,
May 3, 2021, 1:42:03 PM5/3/21
to mementodatabase
It's 
var cliente = entry().field("Customer name");

Bill Crews

unread,
May 3, 2021, 1:42:49 PM5/3/21
to Sebastian Amigon, mementodatabase

I am using the event "Updating a field", before I used "Updating an entry" and with that event the email was sent on mobile but that event does not serve me for spam reasons

I'm sorry; I don't understand. When running the action from the list, it doesn't work on mobile but does on PC? I'd there an error message or what? Could you send us your script or a petition of it?



El lunes, 3 de mayo de 2021 a las 12:21:20 UTC-5, ernst...@gmail.com escribió:
Hallo
Dein Fehler liegt daran dass es zwei verschiedene Programme sind , die auf die selben Daten zugreifen . In der PC Version findet Memento das Feld vom Eintrag ,in der Mobilen Version nicht . Ist warscheinlich das das Skript zu falschen Zeit aufgerufen wird . Versuchen mal " Nach den Speichern " .

Hello
Your mistake is because there are two different programs accessing the same data. In the PC version, Memento finds the entry field, but not in the mobile version. It is likely that the script is called at the wrong time. Try "after saving".

Sebastian Amigon schrieb am Montag, 3. Mai 2021 um 17:08:20 UTC+2:
Hi.
I have a problem, I hope you can help me. It happens that I have a script that is executed when I update a field in the list of entries, the strange thing and that I do not know why it gives the error is that in the desktop version it works correctly but in the mobile version it shows me the error " ReferenceError "Customer name" is not defined "

--
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.

Sebastian Amigon

unread,
May 3, 2021, 1:51:10 PM5/3/21
to mementodatabase
Exactly, I can't send you the script because it contains information about the company where I work but right now I'm sending you a similar one to the one I did for testing

Bill Crews

unread,
May 3, 2021, 2:29:21 PM5/3/21
to Sebastian Amigon, mementodatabase
By itself, it's totally innocent.

Sebastian Amigon

unread,
May 3, 2021, 5:22:40 PM5/3/21
to mementodatabase
I understand it, but I do it to avoid problems. I attach some images of the error.
I also deleted the cfg for security
error1.jpgerror2.jpg

Er Mo

unread,
May 4, 2021, 2:07:03 PM5/4/21
to mementodatabase
Hallo
Hatte schon mal ein Problem das ein Feldname nicht erkannt wurde . Habe im Namen ein Leerzeichen zum Schluß gehabt , das den Fehler verursachte . Ich kopiere den Namen des Feldes , wenn ich mal wieder Probleme habe . Hat schon öffter geholfen .

Hello
Ever had a problem that a field name was not recognized. I ended up with a space in the name that caused the error. I copy the name of the field when I have problems again. Has helped several times.

Sebastian Amigon

unread,
May 4, 2021, 2:11:48 PM5/4/21
to mementodatabase
Hi.
I understand, but why the trigger works in the pc version and not in the mobile version? I do not see sense

Bill Crews

unread,
May 4, 2021, 5:02:06 PM5/4/21
to Sebastian Amigon, mementodatabase
Going back a few years, Memento had a problem with certain special characters, though a fieldname is ordained to allow any UTF-8 characters. I haven't heard of this happening for years now, though. If you can send Vasiliy precisely the same info & screenshots as you sent us -- plus Memento, OS, & JDK (or JRE) release version numbers & a template file -- @ sup...@MementoDatabase.com, I think he can diagnose the problem pretty quickly.

Reply all
Reply to author
Forward
0 new messages