Link To Entry field: Difference between revisions

From Memento Database Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 43: Line 43:
== Examples ==
== Examples ==


=== Companies, products, customers, orders, order line items ===
=== Commercial product sales ===
In this scenario, one or more companies each has its own products and customers. When an order is taken, multiple of the company's products may be sold, each of which will be a line item on the order.
In this scenario, one or more companies each has its own products and customers.
; To establish a one Companys to many Products relationship
When an order is taken, multiple of the company's products may be sold, each of which will be a line item on the order.
: Create a one-to-many Link To Entry field within library Products to library Companys.
 
; To establish a one Companys to many Customers relationship
; Companies have products
: Create a one-to-many Link To Entry field within library Customers to library Companys.
: Create a one-to-many Link To Entry field within library Products to library Companys. To allow companies to share products, make it a many-to-many relationship.
; To establish a one Customers to many Orders relationship
 
: Create a one-to-many Link To Entry field within library Products to library Companys.
; Companies have customers
; To establish a one Orders to many Order Line Items relationship
: Create a one-to-many Link To Entry field within library Customers to library Companys. To allow companies to share customers, make it a many-to-many relationship.
: Create a one-to-many Link To Entry field within library Products to library Companys.
 
; To establish a many Products to many Order Line Itemss relationship
; Customers place orders
: Create a many-to-many Link To Entry field within library Order Line Items to library Products.
: Create a one-to-many Link To Entry field within library Products to library Customers. It doesn't make sense for multiple customers to collaborate in placing an order.
 
; Each order is for one or more items, each for a quantity of a product
: Create a one-to-many Link To Entry field within library Order Line Items to library Orders. An line item belongs to exactly one order.
 
; Products are sold via orders as line items
: Create a one-to-many Link To Entry field within library Order Line Items to library Products. Each line item is for a product.


=== Academic departments, courses, instructors, students, classes ===
=== Academic departments, courses, instructors, students, classes ===

Revision as of 21:08, 25 August 2016

« as of 2016-08-25, editions Mobile 3.9.7, Desktop 1.0.3 »

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

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.

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.

Name and Hint

Standard across all field types.

Advanced Parameters

Library
Select from the list the library to which you wish to link
Display aggregation
Display aggregation by entries of the linked library? Yes or no
Type of relationship
Choices are:
  • Many-to-many
  • One-to-many
  • One-to-one

    By default, it will be a many-to-many relationship.
Required
Make entry of a value mandatory before saving an entry

Display Options

Display in the list as
Select among the following roles for the current field:
  • 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.
Dependencies
Ability to add one or more visibility dependencies upon fields with qualifying types.

Examples

Commercial product sales

In this scenario, one or more companies each has its own products and customers. When an order is taken, multiple of the company's products may be sold, each of which will be a line item on the order.

Companies have products
Create a one-to-many Link To Entry field within library Products to library Companys. To allow companies to share products, make it a many-to-many relationship.
Companies have customers
Create a one-to-many Link To Entry field within library Customers to library Companys. To allow companies to share customers, make it a many-to-many relationship.
Customers place orders
Create a one-to-many Link To Entry field within library Products to library Customers. It doesn't make sense for multiple customers to collaborate in placing an order.
Each order is for one or more items, each for a quantity of a product
Create a one-to-many Link To Entry field within library Order Line Items to library Orders. An line item belongs to exactly one order.
Products are sold via orders as line items
Create a one-to-many Link To Entry field within library Order Line Items to library Products. Each line item is for a product.

Academic departments, courses, instructors, students, classes

In this scenario, one or more academic departments employs instructors, offers courses, admits students, schedules classes taught by instructors and attended by students ===

To establish a many Departments to many Instructors relationship
Create a many-to-many Link To Entry field within library Instructors to library Departments
To establish a one Departments to many Courses relationship
Create a one-to-many Link To Entry field within library Courses to library Departments
To establish a one Departments to many Students relationship
Create a one-to-many Link To Entry field within library Students to library Departments
To establish a one Instructors to many Classes relationship
Create a one-to-many Link To Entry field within library Classes to library Instructors
To establish a one Courses to many Classes relationship
Create a one-to-many Link To Entry field within library Classes to library Courses
To establish a many Classes to many Students relationship
Create a many-to-many Link To Entry field within library Students to library Classes