<?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/12/w/api-documentation/68528/context_5F00_v2_5F00_propertytemplate-script-api</link><description>Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.</description><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>context_v2_propertyTemplate Script API</title><link>https://community.telligent.com/community/12/w/api-documentation/68528/context_5F00_v2_5F00_propertytemplate-script-api</link><pubDate>Fri, 13 May 2022 19:24:53 GMT</pubDate><guid isPermaLink="false">a364a8ac-ca58-401e-bd94-616d7cc2114c</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/12/w/api-documentation/68528/context_5F00_v2_5F00_propertytemplate-script-api#comments</comments><description>Current Revision posted to API Documentation by Former Member on 05/13/2022 19:24:53&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;ul&gt;&lt;li&gt;&lt;a href="#Properties"&gt;Properties&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="#ResolveResource"&gt;ResolveResource&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a name="Properties"&gt;&lt;/a&gt;&lt;div class="documentation-members properties"&gt;&lt;h2&gt;&lt;a id="Properties" name="Properties"&gt;&lt;/a&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&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&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&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&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&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&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&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&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&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&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;&lt;a id="Methods" name="Methods"&gt;&lt;/a&gt;Methods&lt;/h2&gt;&lt;a name="ResolveResource"&gt;&lt;/a&gt;&lt;h3&gt;&lt;a id="ResolveResource" name="ResolveResource"&gt;&lt;/a&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;a id="Velocity" name="Velocity"&gt;&lt;/a&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;a id="JavaScript" name="JavaScript"&gt;&lt;/a&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;a id="Parameters" name="Parameters"&gt;&lt;/a&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&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&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;a id="Returns" name="Returns"&gt;&lt;/a&gt;&lt;em&gt;Returns&lt;/em&gt;&lt;/h4&gt;&lt;p&gt;&lt;div&gt;&lt;code&gt;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>