Button Actions - Substitution Variables

Substitution variables are used in URLs and emails to provide ‘live’ data values at application run-time.

Substitution variables

The following substitution variable types are available:

Type

Value

Description

FDV

Reparsable display format

Database field name
or
Field display name

FDV returns (converts) the database field value as a string using the field’s display format, as specified by the database field properties, but the string may not be reparsable.  The display string may be different than the database field name because you may have selected a different display format.

For example, FDV converts field values to an expanded “display foreign key as” (DFKA) string for DFKA-enabled fields.  For most field types, this is the same as FVS if there is no DFKA configured.  However, FDV will convert Password values to "*****" and Credit Card Number values to the "masked" format (e.g. "XXXX-XXXX-XXXX-0000").

Example:

            FDV:BirthDate

Returns:

            08+December+48+A.D.+00-00-00-AM

(08 December 48 A.D. 00-00-00-AM, assuming the display format is dd MMMM yy gg HH-mm-ss-tt)

FDV may be prefixed by NoUrlEncode to indicate that the value will not be URL encoded.  (E.g., spaces will not be converted to %20.)  However, the value will be HTML encoded.  (E.g., spaces are converted to %20.)

Example:

            NoUrlEncode:FDV:Birth Date

Returns:

            08%20December%2048%20A.D.%2000-00-00-AM

FK

Foreign Key Name

Returns the foreign key or foreign key ID.  The Foreign Key Name is the name of the foreign key either in the database or as a virtual foreign key defined in Iron Speed Designer.

Example:  FK:FK_Orders_Customers

FK may be prefixed by NoUrlEncode to indicate that the value will not be URL encoded.  (E.g., spaces will not be converted to %20.)

Example:  NoUrlEncode:FK_Orders_Customers

FV

Database field name
or
Field display name

Returns (converts) the database field value as a string without using the field’s display format.  For example, dates will always be displayed in the web server's default date format regardless of the field’s properties.  Value is the database field name (not the name of the code generation tag).

Example:

            FV:BirthDate

Returns:

            12%2f8%2f1948+12%3a00%3a00+AM
            (12/8/1948 12:00:00 AM)

FV may be prefixed by NoUrlEncode to indicate that the value will not be URL encoded.  (E.g., slashes will not be converted to %2f.)  However, the value will be HTML encoded.  (E.g., spaces are converted to %20.)

Example:

            NoUrlEncode:FV:BirthDate

Returns:

            12/8/1948%2012:00:00%20AM

FVS

Field display format

Database field name
or
Field display name

FVS returns (converts) the database field value as a string using the field’s “editable” or “reparsable” string format as specified by the database field properties.  This is the same as the FV type, but converted into a string.

Example:

            FVS:BirthDate

Returns:

            08+December+48+A.D.+00-00-00-AM

(08 December 48 A.D. 00-00-00-AM, assuming the display format is dd MMMM yy gg HH-mm-ss-tt)

FVS may be prefixed by NoUrlEncode to indicate that the value will not be URL encoded.  (E.g., slashes will not be converted to %2f.)  However, the value will be HTML encoded.  (E.g., spaces are converted to %20.)

Example:

            NoUrlEncode:FVS:BirthDate

Returns:

            08%20December%2048%20A.D.%2000-00-00-AM

PageCount

N/A

Returns the page count when used with a table control.

PK or ID

None

Returns the record’s primary key.

The “ID” substitution variable constructs a Key object, which is rendered as an XML structure to accommodate composite keys (where the key consists of more than one column).

Virtual foreign keys of database views cannot be used as a URL Parameter using ID.  Consider using FV instead.

Note: PK is an alias for the ID type.

TName

N/A

Returns the table name when used with a table control.

Other encoding options

Option / Modifier string

Value

Description

<ControlName>

N/A

(Optional) ControlName is the name of the RecordControl or TableControl that is responsible for replacing the substitution variable with a data value.  This should only be specified for RecordControls and TableControls that are not inside a repeater.  For TableControls, the table will replace the substitution variable with data values from the currently-selected record.

Note: A URL may have multiple substitution variables (parameters), each with different ControlName elements.

Use URL encoding
NoUrlEncode

N/A

This pre-prefix can be used before ID, PK, FV, FVS, and FDV to prevent the otherwise automatic UrlEncoding of the resulting string.

Example:  NoUrlEncode:FVS:BirthDate

updatedata

N/A

This argument can be used with the special URL parameter "Back", which is related to page history (Back key) handling.

The benefit of using the "updatedata" URL Parameter is that you can return to your Table Report page (e.g. from an Edit Record page) and see the freshest data available at the time you return to the Table Report page.

See Also

Button Actions and Properties

Button Tag Properties

Button Actions

Button Actions - Redirect and Send Email Actions

Button Actions - Substitution Variables

Passing Primary and Foreign Key Values in URLs

Passing Field Values in URLs

Using URL Parameters