Multiple line items with calculations inside one record

60 views
Skip to first unread message

Červeňák Viktor

unread,
Nov 13, 2025, 12:06:58 PM (5 days ago) Nov 13
to mementodatabase
Hi everyone,
I have a question regarding embedded object (sub-records) in Memento Database.

I need to perform basic calculations inside the embedded object, such as:

quantity × unit price

VAT calculation

line total


However, I cannot find any option to use a Calculated field inside the embedded object.

Is this a system limitation, or is there another way to achieve this?
Maybe a workaround (script, formula in the main record, or another method)?

In short, I want one single library for orders/invoices where I can add multiple product line items in one invoice, just like in a standard invoice form.

Thanks for any advice!

Bill Crews

unread,
Nov 13, 2025, 12:24:33 PM (5 days ago) Nov 13
to Červeňák Viktor, mementodatabase
Calculated fields are now ancient and seldom used any more. I highly recommend the use of JavaScript, in JavaScript fields of otherwise, instead. All possible capabilities exist from within JavaScript and the Memento JavaScript and Memento JavaScript UI libraries.


--
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/0dbad67b-99dc-4a3f-bdae-f4105684bfb9n%40googlegroups.com.

Er Mo

unread,
Nov 13, 2025, 12:27:23 PM (5 days ago) Nov 13
to mementodatabase
Hallo
Das " Eingebettete Objekt " ist für eher Einfache sachen . Was du brauchst ist eine Verlinkung ( Link to entry Feld ) . Da können komplexere Strukturen erstellt werden .

Hello

The "embedded object" is for rather simple things. What you need is a link (link to entry field). More complex structures can be created there.

Ernst

Mmm

unread,
Nov 14, 2025, 4:06:07 AM (5 days ago) Nov 14
to mementodatabase
Поля встроенный объект и запись библиотеки не имеют атрибуты с типом вычислимое или JS.
Нужно использовать числовые атрибуты (деньги или вещественное число), а расчетные операции для каждой позиции выполнять с помощью скриптов (триггеры, действия или кнопки).

Вариант решения: ссылки и встроенный объект.

Из ссылки берется имя, цена за единицу и размер НДС. 
Количество указывается в атрибуте для каждой ссылки.
Триггеры выполняют для каждого элемента необходимые расчеты (итоговая сумма, НДС) и формируют строку описания.
Результаты добавляются в поле встроенный объект, а поле ссылок очищается.

Если в скрипте отключить сортировку по имени – новые элементы будут добавляться в начало списка.
При добавлении записей выполняется проверка на наличие дубликатов.
Для быстрой очистки поля встроенный объект есть скрипт действие в карточке записи с подтверждением в окне dialog().

Тестовые библиотеки:

четверг, 13 ноября 2025 г. в 20:27:23 UTC+3, ernst...@gmail.com:
screen-20251114-1.mp4
Reply all
Reply to author
Forward
0 new messages