DonorHub ®
Bridging the information gap between you and your staff...
Understanding DonorHub Lite » Custom Integration Guide > Essential Concepts » Placeholders
Placeholders

Contents

Loading...

Placeholders

Print this Topic Previous pageReturn to chapter overviewNext page

Custom Placeholders

Custom placeholders are a text substitution feature that allow common words or phrases in the configuration of data sources and their associated source scanners to be centrally managed. This allows for an easier decoupling of hard-coded, domain-specific settings. This is helpful for future maintenance and understanding of your own configuration, as well as for making it easier for you to share your settings with others via an exported template. Custom placeholders are managed with the Data Source under the System Setup. Custom placeholders can also be given a custom description to help communicate their purpose with others.

Menu Path: Tools | System Setup

Read More > Saving a Template

Built-in Placeholders

Built-in placeholders are available for a number of tasks. Which built-in placeholders are available depends on the context. These placeholders are provided to supply special, dynamic information. The overall primary use of built-in placeholders is for putting the scan range into the "Source" Query. Built-in placeholders can be identified because they are surrounded with "#" whereas custom placeholders are surrounded with "$".

Read More > Rescan Method

Read More > "Source" Query

For Use With Template-able Settings

Where can you use placeholders? Placeholders are available for use with any configuration setting that has a "Use Template" check box associated with it. Just right-click on any template-able setting and a special menu will appear with "Insert Placeholder" and "Create New Placeholder...".

Source Scanner Scan Range Placeholders

When defining a "Source" Query or "Custom Delete Codes" Query, a number of built-in placeholders are available.

The ones that refer to the scan range begin with "SCAN_FROM_" or "SCAN_TO_". Refer to this chart for the meaning of each possible ending (when it refers to the "scan code" it means the "From" or "To" part of the scan range):

Ends with

How Placeholder is Rendered

NUMERIC_FISCAL_PERIOD#

Assuming a "YYYYMM"-encoded scan code, a number (no quotes) is rendered with the value: (Year * 12) + (Month - 1).

DATETIME#

A date and time is rendered using US settings (most friendly with SQL). It is surrounded with single quotation marks, unless the data source refers to a Jet (MS Access) database in which it is surrounded with "#".

DATE#

A date is rendered using US settings (most friendly with SQL). It is surrounded with single quotation marks, unless the data source refers to a Jet (MS Access) database in which it is surrounded with "#".

TIME#

A date and time is rendered using US settings (most friendly with SQL). It is surrounded with single quotation marks, unless the data source refers to a Jet (MS Access) database in which it is surrounded with "#".

YYYYMMDD#

The first 8 characters of the scan code are rendered surrounded with single quotation marks.

YYYYMM#

The first 6 characters of the scan code are rendered surrounded with single quotation marks.

YYYY#

The first 4 characters of the scan code are rendered surrounded with single quotation marks.

MM#

The 5th and 6th characters of the scan code are rendered surrounded with single quotation marks.

DD#

The 7th and 8th characters of the scan code are rendered surrounded with single quotation marks.

YEAR#

The year is returned as a number (no quotes).

MONTH#

The month is returned as a number (no quotes).

NUMERIC#

The scan code is rendered as a number (no quotes).

CUSTOM#

The raw scan code is rendered surrounded in single quotes.

DEFINED#

TRUE is returned if the scan code is not blank. FALSE is returned otherwise (no quotes).

Security Note

When a built-in placeholder is rendered with quotes, special care is taken to ensure that SQL-injection attacks can not occur. Thus, any embedded quotes are double or escaped.