HomeUsing LincDoc 3.1+eForm AdministrationUsing Document Refinement Annotation Transformer (DRAT)

7.19. Using Document Refinement Annotation Transformer (DRAT)

Document Refinement Annotation Transformer (commonly referred to within the scope of LincDoc as DRAT) can replace LincDoc tags in strings.

Proceed to one of the following sections for more information:

About Tags, Content, and Syntax

DRAT tags use the following format:

<<:type:parameter1:parameter2:...>>

The content is rendered according to the type of tag used, each of which accepts different parameters. Many parameters are optional and trailing parameter separators ( ) may be omitted.

For example:

<<:doc-link:edit:Click Me::>>

Which is the same as the following:

<<:doc-link:edit:Click Me>>

Note: In this example, there is no :: at the end of the second entry.

For example:

<<fieldName>>

is considered the same as

<<:field:fieldName>>

Note: In this example, there is no : after << in the first entry.

Within DRAT tags, the \ (backslash) character is an escape character; meaning that the following character is taken literally. To use <, >, or : in a parameter, escape it with \.

For example:

<<:escape:\<\<\:\>\>>>

produces

<<:>>

About Usage

DRAT expressions can be used in the following places:

About Types

The following types are using with DRAT:

This type creates links to LincDoc documents.

Parameters

Method

Scheme

Used to set the scheme for the URL to something other than the default (which is "https"). Currently the only other available scheme is "lincdoc". When the "lincdoc" scheme is used, iPads are forced to open the LincDoc Mobile app instead of the Safari web browser. Note the "lincdoc" scheme is ONLY valid on an iPad with the LincDoc Mobile app installed. It is meaningless when running LincDoc on a PC.

Event ID

If the event ID is not empty, the event will be fired after the form is loaded.

Note: This parameter only works with the edit and edit-copy methods (listed above).

Type

Document ID Field

Used to define the field value that should be used as the document ID instead of the current document ID.

Example 1: doc-link

<<:doc-link:edit:link text:lincdoc::plain>>

produces

lincdoc://server.lincware.com/lincdoc/doc/edit/a6a0e89c-7bcd-4e82-87f1-7628e3e179ad

where a6a0e89c-7bcd-4e82-87f1-7628e3e179ad is an example UUID generated from a submitted form.

Example 2: doc-link

<<:doc-link:edit::::pre>>

produces something similar to this (note again the sample UUID, which will be unique for each newly submitted form)

<pre>https://server.lincware.com/lincdoc/doc/edit/a6a0e89c-7bcd-4e82-87f1-7628e3e179ad</pre>

Example 3: doc-link

<<:doc-link:edit:link text:::html>>

produces

<a href="https://server.lincware.com/lincdoc/doc/edit/a6a0e89c-7bcd-4e82-87f1-7628e3e179ad">link text</a>

Example 4: doc-link

<<:doc-link:edit:link text:::html:i9DocId>>

produces

<a href="https://server.lincware.com/lincdoc/doc/edit/a6a0e89c-7bcd-4e82-87f1-7628e3e179ad">link text</a>

where a6a0e89c-7bcd-4e82-87f1-7628e3e179ad is pulled from the "i9DocId" field (i9DocId being a field name from the currently running form).

About the escape Type

This type denotes escape content.

For example:

`<<:escape:<<>>`

produces

<<

About the field Type

This type prints field values.

Parameters

About the user Type

This type prints user information for the currently logged in user.

Parameters

Attributes

Example 1: user's name

<<:user:name>>

produces the user's full name.

This page was: Helpful | Not Helpful