linksFrom / linksTo revisited

121 views
Skip to first unread message

Taeke

unread,
Dec 31, 2025, 6:23:09 AM12/31/25
to mementodatabase
All, 

The discussions about linksFrom and linksTo in this forum I found confusing. I stripped the issue to the bare minimum.

I have 2 libraries. One called "Child" and one called "Parent". 
Library "Child" contains a field of type "Link to entry" called "Parent" pointing to the library "Parent".

Retrieving the Parents from a Child record in javascript (in a button for example) =>

let parents = entry().field("Parent");

Retrieving the Children from a Parent record in javascript (in a button for example), =>  2 equivalent options =>

let children = libByName("Child").linksTo(entry()); // Documentend
let children = entry().linksFrom("Child","Parent"); // Undocumented but announced in release notes

Happy New Year


Flaviano

unread,
May 20, 2026, 10:30:12 AMMay 20
to mementodatabase
Thank you very much, Taeke! I saw that in the Inventory template that Mmm suggested yesterday (https://groups.google.com/g/mementodatabase/c/tDrZMBUWCzs/m/PCqZdJEiCQAJ) linksFrom was used, and I couldn't find any documentation about linksFrom (only linksTo is documented). So I searched here and found your enlightening post. Both methods really work equivalently (they are very useful) and you made it clear how to use both.

I'll even write to support suggesting including linksFrom in the documentation. I saw that linksTo was documented at https://scripts.mementodatabase.com/script_api/library/#linkstoentry because it's a property of lib(). But in the case of linksFrom, being a property of entry(), I understand it should be documented at https://scripts.mementodatabase.com/script_api/entry.
Reply all
Reply to author
Forward
0 new messages