Link To Entry field: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div align="right"><small>''&laquo; as of 2016-08-26, editions Mobile 3.9.7, Desktop 1.0.3 &raquo;''</small></div>
{{Stamp|2020-12-08|4.9.2|1.8.1}}
-----
A Link To Entry field may contain a link to an entry or to entries in another library.
A Link To Entry field may contain a link to a 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 or edited 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.


In addition to creating a Link To Entry field in the normal fashion, one may also insert a Relationship, which accomplishes the same thing. This method may be more intuitive for some users.
; 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 or edited 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.


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.
; 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 or edited 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.


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.
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.


== Name and Hint ==
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 select and/or deselect target entr(y|ies) when the entry is edited.
Standard across all [[Field Type|'''field types''']].
 
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 the '''+Field''' list. From a JavaScript field, use '''''field("linkFieldName")[0].field("fieldName")'''''. If from a trigger script, you would need '''''entry().field("linkFieldName")[0].field("fieldName")'''''.
 
; Accessing attributes of Link to Entry fields
: Link to Entry fields may have attributes that will have a value for each linked entry. See '''[[Attributes of linked entries]]'''.
 
; Importing linked Google Sheets
: Links can be set during import or sync with Google Sheets. The Entry Name field or fields (concatenated) is used as the key. "The entry name is unique" option must be enabled in the associated library.
 
{{FieldNameHint}}


== Advanced Parameters ==
== Advanced Parameters ==
Line 27: Line 33:
:* One-to-one<br/><br/>By default, it will be a many-to-many relationship.
:* One-to-one<br/><br/>By default, it will be a many-to-many relationship.


; Required : Make entry of a value mandatory before saving an entry
{{FieldRequired}}


== Display Options ==
== Display Options ==


; Display in the list as : Select among the following roles for the current field:
{{FieldRoleRNDS}}
:* As a Regular field
:* As an Entry Name
:* As an Entry Description
:* As an Entry Status


; Display field name in Entry Edit Card? : By default, yes.
{{FieldOnCard}}


; Dependencies : Ability to add one or more visibility dependencies upon fields with qualifying types.
{{FieldDepend}}


== Examples ==
== Examples ==
Line 77: Line 79:
: Create a one-to-many Link To Entry field within library Order Line Items to library Products. Each line item is for a product.
: Create a one-to-many Link To Entry field within library Order Line Items to library Products. Each line item is for a product.


Slice & dice mostly within the Order Line Items library.
Slice & dice mostly within the Order Line Items library, referencing Products.Price and Orders.Date.


=== Students taking classes ===
=== Students taking classes ===
Line 101: Line 103:
: Create a many-to-many Link To Entry field within library Students to library Classes.
: Create a many-to-many Link To Entry field within library Students to library Classes.


Slice & dice mostly within the Classes library.
Slice & dice mostly within the Classes library, referencing Students.Name, Instructors.Name, Courses.Subject, etc.


=== Doctors, hospitals, and pharmacies ===
=== Doctors, drugs, and pharmacies ===


In this scenario, one or more doctors are affiliated with one or more hospitals, both provide services to patients, doctors prescribe drugs, patients take drug doses, etc.
In this scenario, one or more doctors are affiliated with one or more hospitals, both provide services to patients, doctors prescribe drugs, patients take drug doses, etc.
; Doctors are affiliated with hospitals.
: Create a many-to-many Link To Entry field within library Doctors to library Hospitals.


; Doctors provide services to patients.
; Doctors provide services to patients.
: Create a many-to-many Link To Entry field within library Services to library Doctors.
: Create a many-to-many Link To Entry field within library Services to library Doctors.


[TBD]
; Doctors write prescriptions for drugs to patients
: Create a one-to-many Link To Entry field within library Prescriptions to library Doctors.
 
; Pharmacies fill and refill prescriptions
: Create a one-to-many Link To Entry field shotgun library Pavilions to library Pharmacies.
 
; Patients take drug doses
: Create a one-to-many Link To Entry field within library Doses tip library Prescriptions.
 
Slice & dice within Doses to manage prescriptions, referencing Doctors.Name, Drug.Name, Prescriptions.Quantity, Prescriptions.Refills, etc.
 
[[Category:Spec]]

Navigation menu