sql() function in JavaScript field returns ReferenceError: "sql" is not defined.

111 views
Skip to first unread message

dan_6237623899

unread,
Oct 22, 2024, 2:48:43 PM10/22/24
to mementodatabase
Memento 5.5.1 Android

New user here, sorry if I'm missing something obvious.

I want to populate values in a parent library based on conducting some conditional aggregation in a couple of child libraries.

The SQL explorer works fine, but when I try to use the sql() function in a Javascript field I get the error message above, however simple the query string is.

Do I need to include the sql() function somewhere I've missed in the settings?

As a quick test, other functions like field() work fine.

Er Mo

unread,
Oct 22, 2024, 4:03:51 PM10/22/24
to mementodatabase
Hallo
SQL Ist relativ neu in Memento hinzugekommen . Aktuell ist 5.5.2 mit Bug fixes . Vielleicht ist da ein Fehler behoben worten . Mal Versuchen .

Hello
SQL has been added to Memento relatively recently. The current version is 5.5.2 with bug fixes. Perhaps a bug has been fixed. Give it a try.

Ernst

Bill Crews

unread,
Oct 23, 2024, 12:00:35 AM10/23/24
to dan_6237623899, mementodatabase
There are many functions & methods available in trigger, action, & button scripts that are not available in a JavaScript field. Maybe sql() is one of those? 


--
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/6f5e7fb6-efd8-4d7d-a979-664e2ba9e210n%40googlegroups.com.

dan_6237623899

unread,
Oct 23, 2024, 2:38:21 AM10/23/24
to mementodatabase
Ah, makes sense, thanks. I hadn't tried out Action Scripts yet, was just doing a bit of prototyping thing to run the query from the JavaScript field. I guess I could run the query onLoad and then use field or entry objects to populate from there.

dan_6237623899

unread,
Oct 23, 2024, 3:21:06 AM10/23/24
to mementodatabase
Thanks. I needed to read the documentation more carefully: 'The Memento JavaScript Library may be used to access Memento facilities (by all except JavaScript fields)'

Great app, by the way.
Reply all
Reply to author
Forward
0 new messages