PICK (column)

(Since 1.2.0) -- Relationship columns
A relationship column is essentially a select list containing items from the related type. If you create a column in one pod that relates to another pod, "event", then in the edit form you'll see a select list with all "event" items.

Relationship Types

Type Details
Pod an item in one pod can relate to items in another
WP Page a pod item can relate to one or more WordPress Pages
WP Post a pod item can relate to one or more WordPress Posts
WP User a pod item can relate to one or more WordPress Users
WP (Parent) Category if a category has children, then a pod item can relate to one or more of these children

Creating a Relationship

  • Click the "Add new column" button
  • Enter a name and label
  • For the Column Type, select "pick"
  • Select the pod you want this column to relate to (or one of the WP items)
  • Save the column

Filtering / Ordering PICK Items in the Form

There are two options for Relationship fields, "Filter" and "Orderby". These interact with the MySQL statement to select the values.
Values should reference non-PICK column names, without a t. prefix.

Examples

Filter Examples

is_active=1
or
event_date>NOW()

Orderby Examples

is_active DESC
or
event_date ASC

Bi-directional Relationships

Bi-directional Relationships, as the name suggests, allows you to make "double sided" relationships. With Bi-directional Relationships it's possible assign a pick column to a pod and, for the pod picked, a "reverse pick" to that first pod.
For example, you've got 2 pods: "author" and "book". To create a bi-directional Relationship, you'd add a "related_books" PICK column in your "author" pod, and a "related_author" PICK column in your "book" pod.
Then, let's say that you add 10 new books. For each book, you select an author from the dropdown list. With a bi-directional relationship you won't have to go back into the author pod and manually select the related books from the dropdown. So every time each item is updated, the relationships on both sides will be updated.