Link To Entry field: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{Stamp|2016-09-03|3.9.7|1.0.3}}
{{Stamp|2016-011-22|4.1.0|1.0.7}}
A Link To Entry field may contain a link to a library.
A Link To Entry field may contain a link to an entry or to entries in another library.


; For many-to-many links : When an entry is created or edited, the user may select the entries in the linked library to which the new entry will be linked.
; For many-to-many links: When an entry is created or edited, the user may select the entries in the linked library to which the new entry will be linked.<br/>Though a many-to-many relationship is theoretically symmetrical, the link field is created in only one of the libraries, so choose the library that you intend to use to reference the other.
; For one-to-many links : When an entry is created or edited, the user may select the entry in the linked library to which the new entry will be linked.
 
; For one-to-one links : When an entry is created or edited, the user may select the entry in the linked library to which the new entry will be linked. If the selected entry is already linked to another entry in the current library, the attempt will be disallowed.
; For one-to-many links: When an entry is created or edited, the user may select the entry in the linked library to which the new entry will be linked.<br/>The link is created in the library that will contain the children (the '''many''' side), identifying at library edit time the library that will contain the parent entry (the '''one''' side) and identifying at entry creation or edit time the entry in that library that is the parent of the entry being created or edited.
 
; For one-to-one links: When an entry is created or edited, the user may select the entry in the linked library to which the new entry will be linked. If the selected entry is already linked to another entry in the current library, the attempt will be disallowed.<br/>Though a one-to-one relationship is theoretically symmetrical, the link field is created in only one of the libraries, so choose the library that you intend to use to reference the other.


In addition to creating a Link To Entry field in the normal fashion, one may also insert a Relationship, which accomplishes the same thing, using the name of the linked library as the link field name. This method may be more intuitive for some users.
In addition to creating a Link To Entry field in the normal fashion, one may also insert a Relationship, which accomplishes the same thing, using the name of the linked library as the link field name. This method may be more intuitive for some users.


When an entry is created, the user will be prompted to establish the value of the field, which involves accessing the target library and displaying an Entry List, enabling selection of target entry(ies). The user also may relink a library when the entry is edited.
When an entry is created, the user will be prompted to establish the value of the field, which involves accessing the target library and displaying an Entries List, enabling selection of target entr(y|ies). The user also may deselect target entr(y|ies) when the entry is edited.


Once linked, fields in the linked library may be referenced from the current library from '''[[Calculation field]]''' scripts, '''[[JavaScript field]]''' scripts, and from aggregation functions.
Once linked, fields in the linked library may be referenced from the current library from '''[[Calculation field]]''' scripts, '''[[JavaScript field]]''' scripts, and from aggregation functions.<br/>From a  Calculation field, use linkFieldName.fieldName or pick from +Field list. From a JavaScript field, use field("linkFieldName")["fieldName"]. (If from a trigger script, you would need entry().field("linkFieldName")["fieldName"].)


; Importing linked Google Sheets
; Importing linked Google Sheets