<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>context_v2_propertyTemplate Script API</title><link>https://community.telligent.com/community/14/w/api-documentation/79580/context_5F00_v2_5F00_propertytemplate-script-api</link><description>&lt;p&gt;&lt;span&gt;Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.&lt;/span&gt;&lt;/p&gt;</description><dc:language>en-US</dc:language><generator>14.0.0.684 14</generator><item><title>context_v2_propertyTemplate Script API</title><link>https://community.telligent.com/community/14/w/api-documentation/79580/context_5F00_v2_5F00_propertytemplate-script-api</link><pubDate>Wed, 14 May 2025 17:07:26 GMT</pubDate><guid isPermaLink="false">6c5e78e6-539e-470e-8d01-5a1eb817e67d</guid><dc:creator>Verint | Telligent Community</dc:creator><comments>https://community.telligent.com/community/14/w/api-documentation/79580/context_5F00_v2_5F00_propertytemplate-script-api#comments</comments><description>Current Revision posted to API Documentation by Verint | Telligent Community on 05/14/2025 17:07:26&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;div class="documentation"&gt;&lt;p&gt;&lt;div class="message error"&gt;This extension is only available when rendering a macro as a custom property template for a configuration property. It is not generally available for use by widgets, embeddables, or automations.&lt;/div&gt;&lt;/p&gt;&lt;a name="Properties"&gt;&lt;/a&gt;&lt;div class="documentation-members properties"&gt;&lt;h2&gt;Properties&lt;/h2&gt;&lt;table cellspacing="0" cellpadding="2" width="99%" class="WikiTable"&gt;&lt;thead&gt;&lt;tr class="WikiTableBgBlue"&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Access&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;CanStoreUrlContents&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[Boolean Script API Type|Boolean]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;Returns true if the configuration store for this property supports storing referenced URL contents. When URL contents can be stored, local CFS URL references in HTML, Url, UrlList, and configured Custom properties will be saved with this configuration data.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;DateFormatString&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The .net format string used to format a DateTime object into a date string.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;DateTimeFormatString&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The .net format string used to format a DateTime object into a date-and-time string.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;FormId&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The client identifier used by the form. This ID can be used with the dynamicForm jQuery plugin to interace with other properties within the same configuration form.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;JsonApi&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The JSON private API to interface with the overall form:
&lt;pre&gt;
{
  register: function({
    hasValue: function() { /* return true or false */ }
    val: function(val) { /* if val is defined, set the value of the property. if not, return the current value */ } 
  }),
  changed: function(val) { /* notify the form of changes to this property&amp;#39;s value */ }
}
&lt;/pre&gt;
This API should be rendered by the template and used to interact with the overall form. The register function should be called by this property template and define the hasValue and val functions. When the value of this property is changed by the rendering of this template, the changed function should be called.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;Property&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[Property Script API Type|Property]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The property to render.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;SerializedValue&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The current value of the property as serialized value.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;TimeFormatString&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The .net format string used to format a DateTime object into a time string.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;UniqueId&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The unique identifier to use for client rendering. Any additional identifiers required by the rendering of the property should be extended from this one.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;ValidUrlPattern&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The regular expression pattern that can be used to validate a URL.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;Value&lt;/td&gt;&lt;td rowspan="1"&gt;Read&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[Object Script API Type|Object]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;The current value of the property.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="documentation-members methods"&gt;&lt;h2&gt;Methods&lt;/h2&gt;&lt;a name="ResolveResource"&gt;&lt;/a&gt;&lt;h3&gt;ResolveResource&lt;/h3&gt;&lt;p&gt;Resolves a language resource name to a string or defaults to the provided text if the resource is not available.&lt;/p&gt;&lt;h4&gt;&lt;em&gt;Velocity&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: velocity"&gt;#set($stringResponse = $context_v2_propertyTemplate.ResolveResource($resourceName, $defaultText))&lt;/pre&gt;&lt;h4&gt;&lt;em&gt;JavaScript&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: javascript"&gt;var stringResponse = context_v2_propertyTemplate.ResolveResource(resourceName, defaultText);&lt;/pre&gt;&lt;h4&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/h4&gt;&lt;table cellspacing="0" cellpadding="2" width="99%" class="WikiTable"&gt;&lt;thead&gt;&lt;tr class="WikiTableBgBlue"&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Required&lt;/th&gt;&lt;th&gt;Default&lt;/th&gt;&lt;th&gt;Options&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;resourceName&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;Resource Name&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1"&gt;defaultText&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;Default Text&lt;/td&gt;&lt;td rowspan="1"&gt;Required&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;td rowspan="1"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h4&gt;&lt;em&gt;Returns&lt;/em&gt;&lt;/h4&gt;&lt;p&gt;&lt;div&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;&lt;a name="ToString"&gt;&lt;/a&gt;&lt;h3&gt;ToString&lt;/h3&gt;&lt;h4&gt;&lt;em&gt;Velocity&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: velocity"&gt;#set($stringResponse = $context_v2_propertyTemplate.ToString())&lt;/pre&gt;&lt;h4&gt;&lt;em&gt;JavaScript&lt;/em&gt;&lt;/h4&gt;&lt;pre class="brush: javascript"&gt;var stringResponse = context_v2_propertyTemplate.ToString();&lt;/pre&gt;&lt;h4&gt;&lt;em&gt;Returns&lt;/em&gt;&lt;/h4&gt;&lt;p&gt;&lt;div&gt;&lt;code&gt;[[String Script API Type|String]]&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>