1. Home
  2. Docs
  3. Index
  4. Data Explorer
  5. Table and view settings

Table and view settings

WP Data Access > Data Explorer > Manage > Settings

This is a very powerful feature which allows plugin users to add a layer around a table or view. Settings defined for a table or view are available to all other plugin tools (Data Explorer, Data Projects and Data Publisher).

For example, if you change the column labels of a specific table, these labels are used in the Data Explorer, Data Projects and Data Publications. This allows you to manage table and views settings at one central location.

The following settings are available:

Search Settings

Advanced search settings are available for premium plugin users. Read more…

Table Settings

To add a custom hyperlink to a table row, columns can be defined as type hyperlink (see Column Settings). Hyperlink columns are stored in JSON or plain TEXT format. This is defined on table level in this section.

If hyperlinks are stored in JSON format, a hyperlink column contains a hyperlink label, url and target. A hyperlink column must be large enough to store the whole JSON string. If hyperlinks are stored in TEXT format, the full URL is entered in plain text.

When a column is set to hyperlink and is stored in JSON format, the column shows a link icon on the data entry (behind the hyperlink column) and allows to enter a label, url and target (see image below – click to enlarge). When stored as plain TEXT it is represented as a normal text field.

Column Settings

Column Labels

Column labels are automatically used throughout the plugin in all list tables and data entry forms (Data Explorer, Data Publisher and Data Projects). Within the Data Publisher and Data Projects tools column labels can be overwritten.

There are two types of column labels:

  1. Column labels for list tables
  2. Column labels for data entry forms

If you do not define any column labels for a table or view, the default label settings will be used.

Column Types
WordPress Media Library integration

The plugin supports WordPress media library integration for column types:

  • Attachment
  • Audio
  • Image
  • Video

These columns will be handle as media columns throughout the plugin, including list tables, data entry forms, Data Publisher pages and Data Project pages.

Attachments

Attachment columns can store any media from your WordPress media library. In a list table an attachment is shown as a link to the associated file. Media can be added in a data entry form in edit mode. In view mode the attachment is shown as a hyperlink.

Audio

Audio columns can only store audio from your WordPress media library. The plugin generates an audio shortcode for this type of media in list tables. Audio can be added in a data entry form in edit mode. In view mode an audio shortcode is added to the form.

Images

Image columns can only store images from your WordPress media library. The plugin generates an img tag for this type of media in list tables. Images can be added in a data entry form in edit mode. In view mode an img tag is added to the form.

Video

Video columns can only store video from your WordPress media library. The plugin generates an video shortcode for this type of media in list tables. Video can be added in a data entry form in edit mode. In view mode an video shortcode is added to the form.

Multiple and single media columns

The plugin supports multiple as well as single media columns:

  • NUMBER columns are handled as single media columns
  • VARCHAR columns are handled as multiple media columns

Single media columns can only save only one media id. Multiple media columns can save as many media id’s as you like. The width of your char column determines the maximum number of id’s that can be stored. Make sure your column is wide enough!

Column format examples
  • column “bike_photo bigint(20) unsigned” can store one image or attachment
  • column “bike_attachments varchar(200)” can store multiple images or attachments untill there is no more space left
Notes
  • The association with the WordPress media library will only work within the plugin!
  • Version 2.5.1 allowed to define media columns in the Data Publisher and Data Projects tools. From version 2.7.0 these settings are no longer available. Please transfer your media columns to your table settings as described above.
  • Data entry for media columns is only available within the WordPress dashboard. Shortcode usage on web pages offers supports for WordPress media columns in list tables only.

A real time example of a publication using WordPress media library integration for an Attachment and an Image column is shown below.

» More information about WordPress media library integration…

BrandBrand TypeColorPhotoAttachmentsPriceLicence PlateCategoryFuel TypeMileageEngine CapacityNo Cylinders
BrandBrand TypeColorPhotoAttachmentsPriceLicence PlateCategoryFuel TypeMileageEngine CapacityNo Cylinders
Other column types
Hyperlink

Stores a static hyperlink in JSON or TEXT format (see Table Settings for more information). The hyperlink can be entered in the data entry form of the table, and is shown as a hyperlink in list tables and publications.

ImageURL

Stores a static image url. The url can be entered in the data entry form of the table, and is shown as an image in list tables and publications.

Dynamic Hyperlinks

A dynamic hyperlink is generated on the fly. Column variables can be added to a hyperlink and are substituted on generation. Allows to add custom HTML (see icons in example below – click to enlarge).

To add a dynamic hyperlink to a table or view:

  • Start the Data Explorer
  • Click on the Manage link of the table or view to which you want to add the hyperlink
  • Click on Dynamic Hyperlinks
  • Add your hyperlink(s)
  • Save your hyperlink(s)

See example below (click to enlarge)

Hyperlink Label

Column label in a list or on a form.

+List?

Enable if hyperlink should be shown in lists.

+Form?

Enable if hyperlink should be shown in forms.

+Window?

Enable if hyperlink should be opened in a new tab or window.

HTML

Add a URL(like https://your-domain/) or add your own HTML including one or more hyperlinks. If you just add a URL, the plugin will use the Hyperlink Label and +Windows? settings. Otherwise the plugin uses your HTML code.

Add your own HTML if you want to:

  • add multiple hyperlinks in one column
  • use icons in your hyperlinks instead of the label text
  • your own HTML to this column
Notes
  • Links are added to the end of the table or view in the Data Explorer and Data Projects
  • Links can be added on any position in the Data Publisher
Column Value Substitution

To use column values in a hyperlink simply add the column name between $$ to your URL or HTML. In the example below the variable $$id$$ is substituted with the value for column id. Column id must be a column of the table for which the hyperlink is created.

https://your-domain/service.php?id=$$id$$

Data Publisher Example

To add a hyperlink to a publication:

  • Edit the publication
  • Click on button “Select”
  • Add your columns and hyperlinks to the list on the right side
  • Save your publication

Dashboard Menus

This features allows admin users to add fully functional list tables and data entry forms for a database table to their own WordPress dashboard menu, as well as the dashboard menu of non admin users. This is the simplest way to create data entry forms.

Menu name

The menu name as it will appear in your menu.

Menu slug

Enter the menu slug of the main page. This is the menu to which your menu item will be added (example: the menu slug of the Data Explorer is wpda).

Roles authorized

Only users having this role will see the menu item. Support the selection of multiple roles.

Non admin users

Although non admin users do not have access to the plugin menu, you can use the plugin menu (menu slug = wpda) to give these users acces to specific tables. Non admin users will see the plugin menu but have access to explicitly granted tables only. They will have no access to other resources of the plugin menu. This option is demonstrated in the video below.


Advanced data entry forms

The Data Projects tool is part of the WP Data Access plugin and allows plugin users to create more sophisticated data entry forms, with support for:

  • Registration forms
  • Master detail forms
  • Lookups
  • Layout control
  • Role management
  • And much more…

» This is a good starting point to learn more about Data Projects

Was this article helpful to you? Yes 1 No

Leave a Reply

Your email address will not be published. Required fields are marked *