Sscript

116 views
Skip to first unread message

Randy Flinn

unread,
Aug 14, 2025, 10:10:10 PMAug 14
to Vasily from Memento, mementodatabase
Does the following not function in the iOS environment?

entry().linksFrom

Randy

Bill Crews

unread,
Aug 15, 2025, 11:34:01 AMAug 15
to Randy Flinn, Vasily from Memento, mementodatabase
Assuming the wiki is still functional, under the Entry object in the Memento JavaScript Library page in the Scripting section, there is no mention of a linksFrom() method of that object. 

That said, the Releases page indicates that such a method was added, so I guess it probably exists, but its arguments, return values, and so on are just not documented in the main place one would look for it in the wiki. 

This makes me very sad.

Don't forget the parentheses when referring to it, because if they weren't there, people will think you're referring to one of the object's properties rather than a method. It's linksFrom(). Make sure the object your trying to call it from is an Entry object, assuming the method exists, as suggested by Mmm and the Releases page.


--
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/CAK8kyHYi4HyGgoBUN%2B4p2DFAgG_FMMAa_Y7b0pEGCC%3DgVwyG%2Bg%40mail.gmail.com.

Mmm

unread,
Aug 16, 2025, 9:11:13 AMAug 16
to mementodatabase
Альтернативный вариант.
Три варианта подсчёта из библиотеки "lib2-2".
Выберите подходящий сценарий: скрипты действия в библиотеке, карточке записи или массовое действие.

Тестовые библиотеки:
пятница, 15 августа 2025 г. в 18:34:01 UTC+3, bill....@gmail.com:

Mmm

unread,
Aug 16, 2025, 11:29:47 AMAug 16
to mementodatabase
Странно, здесь не должно быть препятствий для iOS.
Если версия не поддерживает map() могу преобразовать все в простые циклы.

Какие ошибки получаете?

суббота, 16 августа 2025 г. в 16:11:13 UTC+3, Mmm:

Mmm

unread,
Aug 16, 2025, 11:57:42 AMAug 16
to mementodatabase
Создайте копии библиотек. Копировать структуру разрешено. Все скрипты будут видны. 
Проверьте и первый вариант. Там тоже есть такое разрешение.

суббота, 16 августа 2025 г. в 18:29:47 UTC+3, Mmm:

Mmm

unread,
Aug 16, 2025, 12:03:04 PMAug 16
to mementodatabase
И проверьте разрешения для скриптов в "lib2" ("lib2-2") - должен быть доступ к "lib3" ( "lib3-2").

суббота, 16 августа 2025 г. в 18:57:42 UTC+3, Mmm:

Mmm

unread,
Aug 16, 2025, 12:10:39 PMAug 16
to mementodatabase
Первый вариант (https://groups.google.com/g/mementodatabase/c/scw_dD8-ibg/m/zt8qpCCcCQAJ) предпочтителен. Расчеты выполняются автоматически в поле JS.
Второй вариант требует вмешательства пользователя.
Можно автоматизировать вариант 2 с помощью триггеров. Нужно знать как используются библиотеки и какого решения достаточно (создание и изменение записи или создание и удаление связей).

суббота, 16 августа 2025 г. в 19:03:04 UTC+3, Mmm:

Mmm

unread,
Aug 17, 2025, 12:18:46 AMAug 17
to mementodatabase
Шаблоны примеров. 
Библиотеки из облака удалены.

суббота, 16 августа 2025 г. в 19:10:39 UTC+3, Mmm:
example_1.mlt2
example_2.mlt2

Mmm

unread,
Aug 17, 2025, 9:06:49 AMAug 17
to mementodatabase
Итоговый вариант с автоматизацией.
Пересчет осуществляется триггерами (создание и удаление записи в "lib3-3", создание и удаление связи в "lib2-3") или вручную разными способами из любой библиотеки.
В случае восстановления записи из корзины в "lib3-3" необходимо выполнить пересчет любым доступным скриптом действия (триггер восстановление записи из корзины не предусмотрен разработчиком).

воскресенье, 17 августа 2025 г. в 07:18:46 UTC+3, Mmm:
example_3.mlt2
Reply all
Reply to author
Forward
0 new messages