QPR Installation Instructions

ForEach Replacement Tag

ForEach Replacement Tag

Previous topic Next topic  

ForEach Replacement Tag

Previous topic Next topic JavaScript is required for the print function  

ForEach Replace Tag uses given template for every object in given model object property.

 

Parameter

Description

Attribute

Attribute identifier of the model object attribute whose objects are to be used.

Template

Template used for those attributes.

 

 

 

E.g. tag

<#ForEach attribute="resources" template="pg_detailsview_resources_row.tpl">

(found in pg_detailsview_resources.tpl in portal-layout) uses template pg_detailsview_resources_row.tpl for every resource connected to the object for which the view is being shown. Finally the tag is replaced by the result. The available attributes depend on the type of the view as follows:

 

Attribute

View type

Iterated objects

Result type

connectedusers

Resource or organization unit detail view

Connected users.

User

customattributes

Any detail view.

Custom attributes.

Custom attribute

incomingflows

Any detail view.

Incoming flows.

Flow

informationitems

Any detail view.

Linked information items.

Model object

notes

Any detail view.

Linked notes.

Model object

organizationunits

Any detail view.

Oranization units.

Model object

outgoingflows

Any detail view.

Outgoing flows.

Flow

processlevels

Any model object specific view (including detail and flowchart views).

Process levels in which the object exists.

Model object

processteps

Any model object specific view (including detail and flowchart views).

Process steps.

Model object

resources

Any detail view.

Linked resources.

Model object

suborganizationunits

Any organization unit specific view (organization unit detail view)

Sub organization units.

Model object

 

 

The templates are evaluated for every iterated object using special replace tag handling mechanism in which, in addition to inheriting the tags available to the template in which ForEach tag is used, also some result type specific tags are available. These replace tags are described in the following tables.

 

Replace tags available for model object-type attributes

Tag

Description

accesslevel

Returns the access level of the model object for the current user. (-1 = no access, 0 = view only, 1 = update, 2 = administrate)

description

Description of the model object.

detailsurl

Default details URL of the model object.

flowchartimageurl

Flowchart image URL of the model object (valid only for process models and subprocesses. Otherwise empty).

flowcharturl

Flowchart URL of the model object.

iconurl

Icon URL of the model object.

isoftype

Returns the value of "True"-tag attribute if the type of the model object matches the value of "Type"-tag attribute. Otherwise the value of "False"-tag attribute is returned. Valid types are: 11 = Process Model.

owner

Owner model object of the model object.

name

Name of the model object.

objectid

Object id of the model object.

processlevellocator

Process level locator of the model object. See the general processlevellocator replace tag documentation below for descriptions of the other tag attributes.

type

Type name of the model object.

 

 

Replace tags available for user-type attributes

Tag

Tag attributes

Description

user

attribute="EMail"

User's e-mail address.

user

attribute="FullName"

User's full name.

user

attribute="LoginName"

User's login name.

 

 

E.g. <#User attribute="FullName"> Returns user's full name.

 

Replace tags available for custom attribute-type attributes

Tag

Tag attributes

Description

customattribute

attribute="IsOfType"

Returns the value of "True"-tag attribute if the type of the custom attribute matches the value of "Type"-tag attribute. Otherwise the value of "False"-tag attribute is returned. Valid types are: 1 = Boolean, 2 = Text, 3 = Memo, 4 = DateTime, 5 = Date, 6 = Time, 7 = Relation, 8 = Number.

customattribute

attribute="Name"

Name of the custom attribute.

customattribute

attribute="Relation"

Related model object (or empty if the relation is not set or the type of the custom attribute is not relation (=7)). Attribute2 should be used to determine which model object replace tag should be used for the related model object.

customattribute

attribute="Value"

Value of the custom attribute.

 

 

E.g. <#CustomAttribute attribute="relation" attribute2="detailsurl">

Returns the default details URL for the related object.

 

Replace tags available for flow-type attributes

Tag

Tag attributes

Description

flow

attribute="From"

Model object from which the flow originates (returns the process model itself if the flow does not originate from any specific object). Attribute2 should be used to determine which model object replace tag should be used for the related model object.

flow

attribute="To"

Model object to which the flow goes (returns the process model itself if the flow does not have any specific object as destination). Attribute2 should be used to determine which model object replace tag should be used for the related model object.

flow

attribute="FromProcessLevel"

Process level from which the flow originates (returns the process model itself if the flow does not originate from any specific object). Attribute2 should be used to determine which model object replace tag should be used for the related model object.

flow

attribute="ToProcessLevel"

Process level to which the flow goes (returns the process model itself if the flow does not have any specific object as destination). Attribute2 should be used to determine which model object replace tag should be used for the related model object.

flow

attribute="Flow"

Flow's own model object. Attribute2 should be used to determine which model object replace tag should be used for the related model object.

 

 

E.g. <#Flow attribute="fromprocesslevel" attribute2="name">

Returns the name of the process level from which the flow originates.