<text>

<text> 
The <text> tag defines a text area, that can hold multiline characters. The contents entered here, can be customized using the text attributes.  
Parent tag : <pc>
Child tag   : <prefix>, <suffix>

Note: You'll have to encode the following characters to make the <text> tag display them in your ZML snippets:
  • Encode & (ampersand) as &amp; or &#38;
  • Encode < (less than) as &lt; or &#60;
  • Encode > (greater than) as &gt; or &#62;
  • Encode ' (single quotes) as &apos; or &#39;
You can use the built-in replaceAll() Deluge function to replace each of these characters with their encoded value. For example, the following code snippet encodes the ampersand (&) character present in the Product Description field so that it's displayed as-is in the ZML snippet:

<%
var_content = Products[ID=3888833000000119021].Product_Description;
var_encoded_content = replaceAll(var_content, "&", "&amp;");
%>
<text type='Text' renderAsHtml='true' value='<%=var_encoded_content%>' size='5' color='#333333'></text>

Attributes
Possible Values
  • Text
  • Form Data

Default Value

  • Text
Possible Values
typevalueExample

Text

Specify a static string

<text  type='Text'  value='Hello World'/>

Form Data

Fetches a value from a ManageEngine AppCreator application's form, based on the said aggregate.

<text type='Form Data'  value='appLinkName.componentLinkname.fieldLinkName.aggregate'/>#

Note:  

  • #An aggregate must be specifies for the Form Data attribute.
  • The aggregate values that can be computed are: sum, minimum, maximum, median, average, count, distinctCount

AggregateDescriptionSyntax

sum

Computes the sum of all the values in a specified form field.

<text  type='Form Data'  value='appLinkName.formlinkname.fieldlinkname.sum'/>

minimum

Computes the minimum of all values in a specified form field.

<text  type='Form Data'  value='appLinkName.formlinkname.fieldlinkname.minimum'/>
maximumComputes the maximum of all values in a specified form field.<text  type='Form Data'  value='appLinkName.formlinkname.fieldlinkname.maximum'/>
medianComputes the median of all values in a specified form field.<text  type='Form Data'  value='appLinkName.formlinkname.fieldlinkname.median'/>
averageComputes the average of all values in a specified form field.<text  type='Form Data'  value='appLinkName.formlinkname.fieldlinkname.average'/>
countComputes the count of all the records in a specified form.<text  type='Form Data'  value='appLinkName.formlinkname.ID.count'/>
distinctCountComputes the distinct number of occurances of a value in a specified form field.<text  type='Form Data'  value='appLinkName.formlinkname.fieldlinkname.dictinctCount'/>

  • value acts as a source attribute. i.e: Attributes including size, bold, italic, fontFamily, color and bgColor  are styling attributes for the text content and applicable only when a value is specified.
Syntax
<text type='Form Data'  value='Student_management.term_exam.marks.maximum' criteria='class==&quot;12&quot;'/> 

Note:  

  • criteria attribute is optional. 
  • criteria attribute can be used to add an additional filter to display a specified aggregate. 
Possible Values
  • K (Thousand)
  • M (Million)
  • B (Billion)

Example

Syntax<text value='thisapp.Products.Unit_Price.sum' numberScale='K'/>
Output 

Note:  

  • numberScale attribute is optional. 
Possible Values
  • A number from 0-3.

Example

Syntax<text value='thisapp.Products.Unit_Price.sum' decimalPlaces='2'/>
Output 

Note:  

  • decimalPlaces attribute is optional. 
Possible Values
  • , (Comma symbol) 
  • . (Period symbol )

Example

Syntax<text value='thisapp.Products.Unit_Price.sum' thousandSeparator=','/>
Output 

Note:  

  • thousandseparator attribute is optional. 
Possible Values
  • , (Comma symbol) 
  • . (Period symbol) 

Example

Syntax<text value='thisapp.Products.Unit_Price.sum' decimalSeparator='.'/>
Output 

Note:  

  • decimalseparator attribute is optional. 
Possible Values 
  • Arial
  • Georgia
  • Lato
  • Roboto
  • Roboto slab

Example 

Syntax<text type='Text' value='Hello World' fontFamily='Georgia'/>
Output 

 

Note:  

  • fontFamily attribute is optional. Applicable only when a value is specified.
  • If no fontFamily is specified for a value, the text acquires the fontFamily of the application theme. Each application theme uses a different fontFamily.
Possible Values
  • A number from 1 - 9 that defines the size of the text. 

Default Value

  • 4

Example

Syntax

<text type='Text' value='Hello World' size='8'/>

          

Output 

Note:

  • size attribute is optional.
Possible Values
  • true
  • false

Default Value

  • ​​false

Example

Syntax<text type='Text' value='Hello World' bold='true'/>
Output 

Note:

  • bold attribute is optional.
Possible Values
  • true
  • false

Default Value

  • false

Example

Syntax<text type='Text' value='Hello World' italic='true'/>
Output

Note:

  • italic attribute is optional.

 

Possible Values
  • A hexadecimal color value. You can refer this page for hexadecimal color codes.

Example

Syntax<text type='Text' value='Hello World' color='#FF00FF'/>
Output

 

Note:

  • color attribute is optional.
Possible Values 
  • A hexadecimal color value. Refer this page for hexadecimal color codes.

Example

Syntax<text value='Hello World' bgColor='#047B33'/>
Output 

 

Note:  

  • bgColor attribute is optional. Applicable only when a value is specified.
Possible Values 
  • A numeric value in pixels
Syntax<text value='Hello World' padding='20px'/>
Output 

Note:  

  • padding attribute is optional.
Possible Values 
  • A numeric value in pixels
Syntax<text value='Hello World' paddingTop='50px'/>
Output 

Note:  

  • paddingTop attribute is optional.
Possible Values 
  • A numeric value in pixels
Syntax<text value='Hello World' paddingRight='20px'/>
Output 

Note:  

  • paddingRight attribute is optional.
Possible Values 
  • A numeric value in pixels
Syntax<text value='Hello World' margin='50px'/>
Output 

Note:  

  • paddingBottom attribute is optional
Possible Values 
  • A numeric value in pixels
Syntax<text value='Hello World' margin='20px'/>
Output 

Note:  

  • paddingLeft attribute is optional
Possible Values 
  • A numeric value in pixels

Example

Syntax<text value='Hello World' margin='50px'/>
Output 

 

Note:  

  • margin attribute is optional
Possible Values 
  • A numeric value in pixels

Example

Syntax<text value='Hello World' marginTop='50px'/>
Output 

 

Note:  

  • marginTop attribute is optional
Possible Values 
  • A numeric value in pixels

Example

Syntax<text value='Hello World' marginRight='400px'/>
Output 

 

Note:  

  • marginRight attribute is optional
Possible Values 
  • A numeric value in pixels

Example

Syntax<text value='Hello World'' marginBottom='50px'/>
Output 

 

Note:  

  • marginBottom attribute is optional
Possible Values 
  • A numeric value in pixels

Example

Syntax<text value='Hello World' marginLeft='400px'/>
Output 

 

Note:  

  • marginLeft attribute is optional
Possible Values 
  • Link
  • Form
  • Report
  • Page
  • Function 

Example

actionSyntax

Link

<text value='Hello World'  action='Link'   url='A URL to be opened '/>*

Form

<text value='Hello World'   action='Form'   componentLinkName='linkname of the ManangeEngine AppCreator form to be opened'   appLinkName='linkname of the ManangeEngine AppCreator application to which the form belongs' />*
Report<text value='Hello World'  action='Report'   componentLinkName='linkname of the ManangeEngine AppCreator report to be opened'   appLinkName='linkname of the ManangeEngine AppCreator application to which the report belongs' />*
Page<text value='Hello World'   action='Page'   componentLinkName='linkname of the ManangeEngine AppCreator page to be opened'   appLinkName='linkname of the ManangeEngine AppCreator application to which the page belongs' />*
Function<text value='Hello World'  action='Function'   functionName='Name of the custom function to be triggered' />*

* Learn in detail about each of the action types in the following sections.

 

Note:  

  • action attribute is optional.
  • The action attribute acts as a source attribute. i.e: One or more of the following attributes viz: url, componentLinkName, appLinkName, functionName, parameters, successMessage, target, popupWidth and popupHeight will be applicable only when an action  is specified.
Possible Values 
  • A url pointing to another website
  • A url pointing to a component within your ManangeEngine AppCreator Account

Example 

  • <text action='Link' url='https://www.zoho.com/creator/'>

Note:  

  • url attribute is optional.​ 
  • It is applicable only when <action='Link'> 
Possible Values 
  • Linkname of the ManangeEngine AppCreator Application component to be opened.

Example 

actionSyntax
Form<text value='Hello World' action='Form' componentLinkName='User_Details'/>
Report<text value='Hello World' action='Report' componentLinkName='User_Details_Report'/
Page<text value='Hello World' action='Page' componentLinkName='User_Dashboard'/>

 

Note:  

  • componentLinkName attribute is optional.​ 
  • It is applicable only when <action='Form'/'Report'/'Page'>
Possible Values 
  • Linkname of the ManangeEngine AppCreator Application to be opened.

Example

actionSyntax
Form<text value='Hello World' action='Form' componentLinkName='User_Details' appLinkName='Resource_management'/>
Report<text value='Hello World' action='Report' componentLinkName='User_Details_Report' appLinkName='Resource_management'/>
Page<text value='Hello World' action='Page' componentLinkName='User_Dashboard' appLinkName='Resource_management'/>

 

Note:  

  • appLinkName attribute is optional.​ You do not need to specify appLinkName if the component you are associating to the action, belongs to the same application you are currently in.
  • It is applicable only when <action='Form'/'Report'/'Page'/'Function'>
Possible Values 
  • A custom function defined in any of your ManangeEngine AppCreator Applications. To get the list of custom functions in your application: Go to Settings -> Extensions ->  Custom Functions

Example

  • <text value='Hello World' action='Function' functionName='send_email'/>

Note:  

  • The functionName can belong to a default namespace or a custom namespace.
  • If the function belongs to a custom namespace : <functionName='namespace_name.function_name'>
  • functionName attribute is optional.
  • It is applicable only when <action='Function'> and a function name must be specified.
Possible Values 
  • When <action='Form' / 'Report' / 'Page'>, parameters refers to the query string that will be appended to the corresponding component's permalink. Refer to this page to learn about using query strings in permalinks of forms, reports and pages.
  • When <action='Function'>, parameters refers to an argument of the selected custom function.​

Example

actionSyntax

Form

<text value='Hello World'   action='Form' componentLinkName='User_Details'   appLinkName='Resource_management'  parameters='App_name=${name}'/>

OR

<text value='Hello World' action='Form' componentLinkName='User_Details'   appLinkName='Resource_management'  parameters='App_name=Zoho Creator'/>

Report

<text value='Hello World'  action='Report'   componentLinkName='User_Details'   appLinkName='Resource_management' parameters='App_name=${name}' />

or

<text value='Hello World'   action='Form' componentLinkName='User_Details'   appLinkName='Resource_management'  parameters='User_Name='Rob'/>

 

Page<text value='Hello World'   action='Page'   componentLinkName='linkname of the ManangeEngine AppCreator page to be opened'   appLinkName='linkname of the ManangeEngine AppCreator application to which the page belongs' parameters='App_name=${name}' />*

 

Note:  

  • parameter attribute is optional.
  • It is applicable only when <action='Form'/'Report'/'Page'/'Function'>
  • parameters can either be a static value like: Name='Rob' or a page parameter.
  • Page parameter must be specified as :  App_name=${name}, where name is the page parameter. 
Possible Values
  • A string

Example

  • <text value='Hello World' action='Function' functionName='send_email' successMessage='Sent Successfully!'/>

Note:  

  • successMessage attribute is optional.
  • It is applicable only when <action='Function'>
Possible Values 
  • new-window 
  • same-window
  • popup

Default Value 

  • new-window

Note:

  • It is applicable only when <action='Link'/'Form'/'Report'/'Page'>
Possible Values 
  • A numeric value in percentage or pixels 
Possible Values 
  • A numeric value in percentage or pixels 
Possible Values
  • true
  • false

Example

Below are sample ZML snippets to display a product's description (which is stored in a Rich Text field) and a static text that contains HTML tags. Note that you'll have to encode certain characters (as mentioned near the start of this page) to ensure that they are rendered in the ZML snippet.
Syntax (to display data from a field)

<%
var_content = Products[ID=3888833000000119021].Product_Description;
var_encoded_content = replaceAll(var_content, "<", "&lt;");
var_encoded_content = replaceAll(var_encoded_content, ">", "&gt;");
%>
<text type='Text' renderAsHtml='true' value='<%=var_encoded_content%>' size='5' color='#333333'></text>

Syntax (to display static text)

<%
var_content = "<div><span class=\"highlight\" style=\"background-color: rgb(255, 255, 153)\"><u>To</u> <i>Display</i> <span class=\"colour\" style=\"color: rgb(51, 51, 255)\">Rich</span> <b>Text</b></span></div>";
%>
<text type='Text' renderAsHtml='true' value='<%=var_content%>' size='5' color='#333333'></text>

Output (showing the static text) 

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: appcreator-support@manageengine.com