General Tags

<< Click to Display Table of Contents >>

Navigation:  General Functions > Configuring the MIE (Programmer's Guide) >

General Tags

The MIE supports the concept of general tags.  These general tags are placeholders that are evaluated when a message is formed and the resultant text is inserted in place of the tag.  General tags are used in report templates, in field definitions, in all messages, and in the Asset Management module's catch point screens.  The catch point screens in Asset Management can be accessed and managed by an administrator with proper access.

General tags may include one level of embedding, meaning that one general tag may be embedded within another, but the embedded tag cannot have yet another general tag embedded within it (that would be 2 levels of embedding).

General tags take the following form:

 {%<tag name>=<tag parameter1>,<tag parameter2>,...,<tag parameterN>%}

The {% sequence delimits the start of a tag and the %} sequence delimits the end.  All tags must be enclosed by a start and end delimiter sequence.

The following tags are supported and may be used any where tags can be used:

{%v<n>%}

Inserts a variable that is sent (by the calling program).  This is a tag that is generally reserved for developers.

{%M=<menuNumber>,<DisplayInRows>,<vertical Align>,<Use Option>,<Children>,<No Separators>%}

Inserts the menu whose number is sent.  Menus are maintained in a table in the MIE's database and each is assigned a specific number.  Menus can be text-based and they can be picture-based.  Menus can display in a horizontal line and they can display in a vertical line.  If DisplayInRows is sent true, the menu is displayed horizontally.  Otherwise, it is displayed vertically. Vertical Align is sent as the HTML vAlign setting (top, middle, etc) to vertically align the menu text. Use Option, if sent as -1, will cause the menu system to use the current option as a means to determine the active menu if all other attempts fail. Children, if sent as -1, will cause the children of the currently active menu option to be included in the menu that is rendered. No Separators, if sent as -1, will suppress the vertical separator bar that is automatically inserted between horizontal menu options.  This tag is generally reserved for developers.

{%CM=<min access>,<class>,<text to display>%}

Inserts a hyperlink which, when clicked, will place the page into change menu mode. Min access specifies the minimum access required to return the link (otherwise a non-breaking space character is returned). Classdefines the CSS class to be used to display the hyperlink text. Text to display is the text to display for the hyperlink.  This tag is generally reserved for developers.

{%LA=<fontClass>,<target page>,<form #>,<forgot pwd text>,<forgot pwd class>,<forgot pwd target>%}

Inserts a login dialog section where the user can login.  The fontClass and forgot pwd class variables refer to the controlling Cascading Style Sheet for the MIE.  The target page and forgot pwd target refer to the target MIE code page to use for login.  The form# variable defines the form that will be loaded by the code page.  This tag is generally reserved for developers.

{%LA1=<fontClass>,<target page>,<form #>,<input class>,<target site ID>,<title class>,<title>,<button class>,<forgot pwd text>,<forgot pwd class>,<forgot pwd target>%}

Same as the LA tag but with more control over the look and feel of the login area.  The class of the input fields, title, and buttons can be specified, along with the title that displays.  This tag is generally reserved for developers.

{%LO=<link class>,<text to display>%}

Inserts a hyperlink which, when clicked, logs the current user out. Link class defines the CSS class to be used to display the hyperlink. Text to display is the text to display for the hyperlink.

{%CC=<fontClass>,<class2>,<class3>,<Horizontal>%}

Inserts the dialog that allows the user to change data sets.  Only inserts the dialog if the user has access to more than one dataset, otherwise nothing is inserted.   FontClass is the CSS class to be used to display the text. Class2 and Class3 are reserved for future use. Horizontal, when sent as -1, causes the dialog to be displayed on one horizontal line.  Otherwise, it is displayed on several (for use in a column).  This tag is generally reserved for developers.

{%CP=<fontClass>%}

For options that are project-based, such as Value Analysis Tool, inserts the dialog that allows the end user to switch projects.   This tag is generally reserved for developers.

{%CPWD=<fontClass>,<text>,<target>%}

Checks to see if the user has had their account set to allow them to change their password.  If so, inserts textas a hyperlink that, when clicked, will take the user to target, so that they can change their password.  If the user cannot change their password, nothing is inserted.  This tag is generally reserved for developers.

{%FLD=<iID>%}

Each edit form on the MIE maintains an active array that defines every field on the screen, how it looks and behaves, and its current value.  Each field is uniquely identified by its IID.  This tag searches the currently active array and, if the IID specified is found, the current value is inserted.  Otherwise, nothing is inserted.  This tag is generally reserved for developers.

{%ACCESS%}

Inserts the user's access level

{%SITEID%}

Inserts the current site ID.  The MIE can host multiple sites, each with a different look and feel.  This is mainly to accommodate private label branding of MIE functionality.

{%CUSTIDCHILDREN%}

Inserts the current customer number as well as the customer numbers of all customers that are direct children of this customer (all customers who have their parent customer set to the current customer).  The results are inserted as a comma-delimited string, suitable for use in a SQL WHERE clause using the IN() construct.  Example:  ... WHERE CustNo IN ({%CustIDChildren%}) ...

Using this tag to form a WHERE clause can allow creating a report that rolls up results for the parent and all children, as an example.

{%SESSION=<variable>%}

The MIE maintains several session variables for each session.  The names of these variables, and what they contain, are maintained by the developers.  When referenced using this tag, the value any of the current session variables will be inserted.   This tag is generally reserved for developers.

{%SETSESSION=<variable>,<value>%}

This tag is used by developers to set a session variable to a given value.   This tag is generally reserved for developers.

{%UPDATEUSERACCESS%}

Causes the user's access to be refreshed.  This is generally a tag that is used when displaying option-specific screen text.  It causes the user's access to be updated as the user switches between options.  The MIE supports a single sign-on, however users can be assigned option-specific access levels.  The MIE automatically updates the user's access as the user switches between options.  That is done through this tag.   This tag is generally reserved for developers.

{%MINACC=<minimum access>|<conditional text>|<option>%|

This tag is used to conditionally display text given the user's access level meets the minimum access and the user has access to the option specified.  Otherwise, nothing is inserted.

{%OPTIONHELPDISPLAY=<html yes>~<html no>~[<help file name>]%}

This tag is used to display conditional html depending on whether or not option help is available. Option helpis option and customer specific and must be loaded by ESI.  If option help is available, then the html yescontent will be added, otherwise the html no content will be added.  The help file name is optional - it defines the actual file name to check for the presence of option help.  If left blank, the default is index.html.

{%OPTIONHELPURL=<[help file name>]%}

This tag is used to insert the URL to get to Option Help, if Option Help exists.  If Option Help does not exist, this tag inserts a non-breaking space (&nbsp;).  The help file name is optional.  If supplied, it becomes the specific help html file targeted by the inserted URL.  If not supplied, the default name of index.html will be used.

{%CUSTLOGO=<height>%}

Insert the current logo image defined for the customer.  This image is defined on the MIE under COMPANY(accessible via Asset Management and other options). Height is optional.  If specified, the image will be set to the height specified, and the width will adjust as well in order to maintain the original aspect ratio.

{%BARCODE=<type>,<text>,<caption>,<height>%}

Inserts a readable bar code image.  type defines the type of bar code to be drawn.  Acceptable values include: bcUPCAbc3OF9bc2OF5bcUPCEbcCODE93bcEAN128AbcEAN128BbcEAN128C, andbcPOSTNET.  Most bar code formats used in asset management are bc3OF9Text is the text to be encoded.Caption is the human-readable caption to be printed under the bar code. Height specifies the height, in pixels, of the bar code.

{%KEYVALUE%}

Inserts the current primary key value of the record being viewed.  This tag is generally reserved for developers.

{%COMPANYNAME%}

Inserts the current company name.  This value is defined on the MIE under COMPANY (accessible via Asset Management and other options).

{%COMPANYSTREETADDRESS%}

Inserts the current company street address.  This value is defined on the MIE under COMPANY (accessible via Asset Management and other options).

{%COMPANYCITY%}

Inserts the current company city.  This value is defined on the MIE under COMPANY (accessible via Asset Management and other options).

{%COMPANYSTATE%}

Inserts the current company state.  This value is defined on the MIE under COMPANY (accessible via Asset Management and other options).

{%COMPANYZIP%}

Inserts the current company zip or postal code.  This value is defined on the MIE under COMPANY(accessible via Asset Management and other options).

{%COMPANYPHONE%}

Inserts the current company phone number.  This value is defined on the MIE under COMPANY (accessible via Asset Management and other options).

{%COMPANYWEBSITE%}

Inserts the current company web site URL.  This value is defined on the MIE under COMPANY (accessible via Asset Management and other options).

{%TODAY%} or {%DATE%}

Inserts today's date

{%DATEADD=<offset>,[m|h|y|n]%}

Calculates and inserts a new date from the current date by adding the offset (in days).  The offset may be a positive or negative (for dates in the past) number.  If the optional parameter is sent as "m", then the offset will be in minutes.  If the optional parameter is sent as "h", then the offset will be in hours.  If the optional parameter is sent as "y", then the offset will be in years.  If the optional parameter is sent as "n", then the offset will be in months.  The default offset is days.

*This tag has been overridden in AAWeb to allow a seed date to be provided.  It works in exactly the same way except the seed date is used instead of the current date for calculations. When no seed date is provided, the default in the current date.  {%DATEADD=<offset>,[m|h|y|n],[seedDate]%}

{%NOW%}

Inserts the current date and time

{%TIME%}

Inserts the current time

{%DATETIMENUM%}

Inserts an integer based on the current time when the tag is resolved in the format of "hhmmSSsss". h = hours, m = minutes, S = seconds, s = milliseconds

Note: this tag is only implemented for the Import Engine, but can be implemented elsewhere as necessary.

{%FOCUS=<variable>%}

Inserts javascript that will set focus to the variableVariable must be a valid HTML form input type.  This tag is generally reserved for developers.

{%CATCHPOINT=[<cp>],[<ip>],[exp>],[<stayloggedin>]%}

Inserts an encrypted query string required by catch point screens. cp is the catch point number (visible on the MIE when managing catch points), ip is an optional parameter that constrains input to coming from only one IP address. exp is the rest of the standard MIE query string (in unencrypted form).  If stayloggedin is sent as non-zero, then the tag will be written such that the catch point screen is invoked without first logging out, maintaining the current access level of the user.  The default behavior is to force a logout as the catch point screen is invoked.  All parameters are optional.  If cp is not sent, then the current key value, as maintained by the site, will be used. This tag is generally reserved for developers.

{%DATAENTRY=<de>,<ip>,exp>%}

Inserts an encrypted query string required by Data Entry Formsde is the Data Entry Form number(visible on the MIE when managing Data Entry Forms), ip is an optional parameter that constrains input to coming from only one IP address. exp is the rest of the standard MIE query string (in unencrypted form).  This tag is generally reserved for developers.

{%CPINFO=<cp>,<which>%}

Inserts various information components from the catch point management screens within Asset Management within the MIE. cp is the catch point number (visible on the MIE when managing catch points). which is defined as follows:

0 - name of the catch point
1 - owner's name
2 - owner's email address
3 - current picture assigned to the catch point
4 - instruction HTML (as defined in the catch point management screens)
5 - the URL to invoke the catch point screen

{%CPINFOROLE=<cproleid>,<which>%}

Inserts various information components from the catch point  management screen that implements the indicated role within Asset Management within the MIE. cproleid is the catch point role id. which is defined as follows:

0 - name of the catch point
1 - owner's name
2 - owner's email address
3 - current picture assigned to the catch point
4 - instruction HTML (as defined in the catch point management screens)
5 - the URL to invoke the catch point screen
 

{%CLASSID=<software component title>,[<version>]%}

Inserts the class ID of the referenced software component. version is optional.  If included, inserts the class ID of the specific version of the software component.  Otherwise, the class ID of the most recent version will be inserted.  This tag is generally reserved for developers.

{%OBJECT=<software component title>,[<version>]%}

Generates an HTML <OBJECT> tag for including the component whose title is sent, causing the component to be downloaded to the target computer if not already installed. version is optional.  If included, inserts the class ID of the specific version of the software component.  Otherwise, the class ID of the most recent version will be inserted.  This tag is generally reserved for developers.

{%SETTING=<customer setting>%}

Looks up the customer setting by name from the settings (dataTypes) table and inserts the current setting in place of the tag.

{%CLIENTAGENTINFO%}

Inserts a comma-delimited string of information to be used by the ActiveX to install the Workstation Data Assistant.  This tag is generally reserved for use when designing catch point screens.

{%SITEFIRSTNAME%}

Inserts the first name of the site (from the dataSites table).

{%SITENAME%}

Inserts the full name of the site (from the dataSites table).

{%LOOKUP=<cfNoReturn>,<cfNoKey>,<MatchValue>|*,[CRLF|BR|<format>]%}

Performs a lookup into the table.column pair defined by cfNoKeycfNoKey refers to a record in the RDCdataFields table, which defines the metadata of a database - specifically the table, column, and characteristics of both.  The value defined in MatchValue is used to perform a lookup in the table.column defined by cfNoKey.  If a match is made, the contents of the column defined by cfNoReturn is returned.  Otherwise, nothing is returned (empty string).  If MatchValue is sent as the asterisk (*), then a comma-delimited string of all return values in all records is returned.  This should be used with caution and only when such a returned string is expected to be of reasonable length.  Each value will be delimited by SQL delimiters.  The primary use of this option is to form a string of SQL values that can be used in a condition (specifically IN or NOT IN).

The optional fourth parameter may be sent as the character string "CRLF", "BR", or any of the valid MIE format strings.  CRLF and BR only work when more than one record matches the MatchValue.  When CRLF is sent the returned list of values will be delimited with a carriage return-line feed pair instead of commas.  When BR is sent the returned list of values will be delimited with the HTML break sequence (<br>).  Also, for both CRLF and BR, the values will not be delimited with SQL delimiters.  If CRLF or BR is not sent, then any other value sent will be interpreted as an MIE format string and the return value will be passed to the MIE's format function with the format string requested.  This applies to every value returned, whether the value is a single value or multiple values.  Note that CRLF, BR, and a formatting string are mutually exclusive.

{%ATTACHMENT=<filename>,[<displayIcon>,<version>,<class>]%}

Inserts a link to download a saved attachment.  The attachment must have been uploaded via one of the many forms that allow uploading attachments.  The tag does not care which form was used to upload the attachment, or which user uploaded it.  If it matches on filename, and optionally version for any attachment contained in the current customer's area, a link will be inserted. displayIcon = -1 if the link is to be inserted as an image that represents the type of file.  Anything other than -1 will be interpreted as text to be displayed as a hyperlink. version is sent greater than 0 if a specific version of the file is to be targeted.  If set as 0 or null, the latest version will be targeted. class is the CSS class for the anchor tag that will be used if the link will be returned as a hyperlink (displayIcon not equal to -1).  If no matching attachment is found, a non-breaking space (&nbsp;) will be inserted instead.

{%CONTRACTINFO=<which>,[<year>],[<contractID>]%}

Depending on the value of which, returns information about the requested contract.

which = 0 - returns a SQL-formatted BETWEEN clause with the start and end dates of the requested period.  The BETWEEN clause can be used directly in a SQL WHERE clause to choose only records within a given date range.

If ContractID is sent as blank or 0, then an attempt is made to isolate a single contract based on any contract that is active, hasn't expired, and has unexpired support hours associated with the contract.  If a single contract results, then the requested information is returned.

If year = blank or 0 - The entire contract range is sent.  Example, if a contract start date is 1/1/2007 and its end date is 12/31/2009, then the following is returned for which=0:

Between '1/1/2007' And '12/31/2009'

If year = (-1) - The current contract year period is returned.  Example, if the contract start date is 4/12/2008 and its end date is 4/11/2011, and today's date is 6/23/2010, then the following is returned for which=0:

Between '4/12/2010' And '4/11/2011'

If year > 0 - The period from the start date + year to the end of the contract is returned.  Example, if the contract start date is 3/11/2010 and its end date is 3/10/2015, and year is sent as 3, the following is returned for which=0:

Between '3/11/2013'' And '3/10/2015'

If any lookup fails to find only one contract, or any other error is encountered, the appropriate error will be logged to the error log and the following will be returned:

Between '<now>' And '<now>'

(Essentially returning a properly formed SQL phrase that is unlikely to match any records.)

 

{%HEX=<hex value>%}

Inserts the ASCII character corresponding to the hex character.  Some common hex values are:

Tab - {%HEX=9%}
Carriage Return - {%HEX=D%}
Line Feed - {%HEX=A%}
Escape - {%HEX=1B%%}
Form Feed - {%HEX=C%}

This tag is usually used to insert unprintable control characters.

{%IID=<iid>,<information>%}

Inserts the desired information for the IID sent.  The IID is the primary key value of the corresponding record in the dataInputs table.  The dataInputs table is used to control the behavior of all input fields.  The values returned will include any overrides that have been written to the UserdataInputs table (overrides the MIE's default value) This tag is usually reserved for developers.  <information> is sent as one of the following:

0 - return the caption
1 - return the report title (CSV column title)
2 - return the default value

{%CONDITION=<condition number>~[Select <columns>]~['']~[0|-1]%}

Returns the WHERE clause generated by the condition number sent.  If the optional SELECT statement is included, then returns a complete SELECT statement by filling in the "FROM <table> WHERE <condition where clause>".  If the optional two single quote characters are included, replaces all instances of single quotes with two single quotes before returning.  The 4th parameter is a binary (0 or -1).  If -1, then the returned WHERE clause is to be formatted for HTML display.  Any > characters will be replaced with &gt; and any < characters will be replaced with &lt;

{%CFNO=<cfNo>,<return value>%}        

Returns the selected return value for the cfNo sent.  cfNo is the numeric identification of a meta-data record on the MIE.  The cfNo refers to a specific MIE table.column.  The following values will be returned based on the number sent as <return value>:

<return value> - 0:  table name
<return value> - 1:  field name
<return value> - 2:  field length
<return value> - 3:  field type (dfNo)
<return value> - 4:  primary key field name for table

{%AUTOINC=<cfNo>%}

Returns the next value from the auto-increment range that supports the cfNo that is sent.

{%LINK=<linkNo>,<return value>%}

Returns the selected return value for the linkNo sent.  linkNo is the numeric identification of a link record within the MIE.  The linkNo refers to a specific link record.  The following values will be returned based on the number sent as <return value>:

<return value> - 0: Link address only
<return value> - 1: HTML for Link (with image if applicable)

{%ROWNUM%}

Returns the current row number in the file for the record being imported

NOTE: This is tag can only be used with the Import Engine