Count participants

121 views
Skip to first unread message

Simon Hall

unread,
Dec 8, 2025, 6:13:21 AM12/8/25
to mementodatabase
In my library 'Pub Visits' I have Link to Entry field called 'Participants (Individual)' which links to library 'Participants' which is just a list of names with a field called 'Name' to use
I would like to create a field in library 'Participants' which shows the number of times each 'Name' appears in library 'Pub Visits' but really don't know where to start.
If the answer involves JS could you please provide some code for me to try. Thanks
Message has been deleted

Mmm

unread,
Dec 10, 2025, 10:07:39 AM12/10/25
to mementodatabase
Ищите на форуме по  linksFrom().
А это не помогло? Поле JS с одной строкой кода. SQL, пресеты не нужны.

понедельник, 8 декабря 2025 г. в 14:13:21 UTC+3, Simon Hall:

Simon Hall

unread,
Dec 12, 2025, 7:55:07 AM12/12/25
to mementodatabase
Thanks Mmm

I have read through all the forum entries that you suggested but they confused me even more.

I Googled and ended up with this:

var linkedEntries = field("Pub Visits"); // Get all linked entries
linkedEntries.length; // The result is the number of linked entries

but it just produces the number 20 for every item

I guess I'm just being old and stupid again 

Mmm

unread,
Dec 13, 2025, 3:44:38 AM12/13/25
to mementodatabase
Три варианта отображения визитов:

1. Общее количество визитов. Данные из поля "linkedEntries" библиотеки "Participants". Об этом варианте говорил выше.

2. Количество визитов в конкретный паб. Данные из поля "pubs_json" библиотеки "Participants". 

3. Общее количество визитов во все пабы и через дробь количество визитов в конкретный паб. Данные из поля "pubs_json" библиотеки "Participants". 

Шаблон библиотеки с примером:

пятница, 12 декабря 2025 г. в 15:55:07 UTC+3, Simon Hall:
IC__13122025.jpg
Reply all
Reply to author
Forward
0 new messages