<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Documentation on implementing a function triggered by change of a token's value? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Documentation-on-implementing-a-function-triggered-by-change-of/m-p/163863#M10089</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to implement a function which triggers by the change of a token's value. Splunk's framework has a method for this, as documented here: &lt;A href="http://dev.splunk.com/view/SP-CAAAEW4"&gt;http://dev.splunk.com/view/SP-CAAAEW4&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Unfortunately, they documentation is very sparse and the example they give only confuses me further. The function which fires on a token change is supposed to accept the arguments ( model, value, options ). In the example, the model that they pass isn't defined anywhere on the page. When I tried putting in a model that I thought was relevant (a search manager which relies on the token) the page threw the error "Uncaught TypeError: Cannot read property 'query' of undefined ". Also, the second argument seems likely to throw another undefined error, since no variable with the same name as the token has been declared. &lt;/P&gt;

&lt;P&gt;Moreover, the documentation doesn't specify any of the "options" that can be passed in as a third argument. &lt;/P&gt;

&lt;P&gt;Can anyone point me to some better documentation, or clarify this for me with a better example?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2014 15:53:52 GMT</pubDate>
    <dc:creator>chrisdopuch</dc:creator>
    <dc:date>2014-07-30T15:53:52Z</dc:date>
    <item>
      <title>Documentation on implementing a function triggered by change of a token's value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Documentation-on-implementing-a-function-triggered-by-change-of/m-p/163863#M10089</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to implement a function which triggers by the change of a token's value. Splunk's framework has a method for this, as documented here: &lt;A href="http://dev.splunk.com/view/SP-CAAAEW4"&gt;http://dev.splunk.com/view/SP-CAAAEW4&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Unfortunately, they documentation is very sparse and the example they give only confuses me further. The function which fires on a token change is supposed to accept the arguments ( model, value, options ). In the example, the model that they pass isn't defined anywhere on the page. When I tried putting in a model that I thought was relevant (a search manager which relies on the token) the page threw the error "Uncaught TypeError: Cannot read property 'query' of undefined ". Also, the second argument seems likely to throw another undefined error, since no variable with the same name as the token has been declared. &lt;/P&gt;

&lt;P&gt;Moreover, the documentation doesn't specify any of the "options" that can be passed in as a third argument. &lt;/P&gt;

&lt;P&gt;Can anyone point me to some better documentation, or clarify this for me with a better example?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 15:53:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Documentation-on-implementing-a-function-triggered-by-change-of/m-p/163863#M10089</guid>
      <dc:creator>chrisdopuch</dc:creator>
      <dc:date>2014-07-30T15:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Documentation on implementing a function triggered by change of a token's value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Documentation-on-implementing-a-function-triggered-by-change-of/m-p/163864#M10090</link>
      <description>&lt;P&gt;This function will give you model,value, and options to use on token change(if you need to).&lt;BR /&gt;
You do not pass something literally through this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  defaultTokenModel.on("change:tokenName", function(model, value, options) {
       //now I can use the objects "model", "value", and "options" if i need to use these within my fuctionality
    });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jul 2014 18:46:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Documentation-on-implementing-a-function-triggered-by-change-of/m-p/163864#M10090</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-07-30T18:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Documentation on implementing a function triggered by change of a token's value?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Documentation-on-implementing-a-function-triggered-by-change-of/m-p/163865#M10091</link>
      <description>&lt;P&gt;The "model" parameter refers to the token model on which the on() function was invoked. You probably don't care about it.&lt;/P&gt;

&lt;P&gt;The "value" parameter refers to the new value of the token.&lt;/P&gt;

&lt;P&gt;The "options" parameter gives more information about how the token was changed that you probably don't care about. See the Backbone documentation for the on() call if you want details.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2014 19:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Documentation-on-implementing-a-function-triggered-by-change-of/m-p/163865#M10091</guid>
      <dc:creator>dfoster_splunk</dc:creator>
      <dc:date>2014-07-30T19:49:41Z</dc:date>
    </item>
  </channel>
</rss>

