<?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 Re: pass a parameter to xml view from iframe in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91852#M5000</link>
    <description>&lt;P&gt;Hi Nick, &lt;BR /&gt;
thanks for you answer, I do not want to redirect the users to the default search UI, instead I need only to show them the result right on the page. having the view the way indicated in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Developer/3rdParty"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Developer/3rdParty&lt;/A&gt; is giving exactly what I need however I would like to extend that to supply F on the fly. I am trying to create forms however what I am getting back is a full search form which I don't want, I probably want to have a drop down menu where users can select F as example and I then can pass that somehow to my view which returns a chart.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2011 16:59:37 GMT</pubDate>
    <dc:creator>firasarabo</dc:creator>
    <dc:date>2011-10-18T16:59:37Z</dc:date>
    <item>
      <title>pass a parameter to xml view from iframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91850#M4998</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I followed the example shown at &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Developer/3rdParty"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Developer/3rdParty&lt;/A&gt; &lt;BR /&gt;
and created a view that does some search as:&lt;/P&gt;

&lt;P&gt;&lt;VIEW template="dashboard.html"&gt;&lt;BR /&gt;
  &lt;MODULE name="HiddenSearch" autorun="True" layoutpanel="panel_row1_col1"&gt;&lt;BR /&gt;
    &lt;OBJECT&gt;&lt;PARAM name="search" /&gt;A="REQFS" F=SomeService | timechart span=5m count&lt;BR /&gt;
    &lt;PARAM name="earliest" /&gt;-1h&lt;BR /&gt;
    ....&lt;BR /&gt;
    ....&lt;/OBJECT&gt;&lt;/MODULE&gt;&lt;/VIEW&gt;&lt;/P&gt;

&lt;P&gt;and I am calling this view from iframe like:&lt;BR /&gt;
&lt;A href="http://mysplunkserver/en-US/account/insecurelogin?username=admin&amp;amp;password=changeme&amp;amp;return_to=/app/myapp/some"&gt;http://mysplunkserver/en-US/account/insecurelogin?username=admin&amp;amp;password=changeme&amp;amp;return_to=/app/myapp/some&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;and results show up fine, what I need to do is to pass parameters to change the time and F= values on the fly, how to do that?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2011 00:50:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91850#M4998</guid>
      <dc:creator>firasarabo</dc:creator>
      <dc:date>2011-10-14T00:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to xml view from iframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91851#M4999</link>
      <description>&lt;P&gt;Kind of a pain with just the core Splunk modules but what you'd do is create a fully formed search string incorporating your dynamic value of "F", from wherever you're putting the iframe.  (I'm assuming that your iframe is being created in some third party system by the way, not in a Splunk view).  Then you want to form time arguments either as epochTime numbers or splunk's relative time expressions (-24h, rt-30m@m) etc.. ,  &lt;/P&gt;

&lt;P&gt;Then instead of &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;return_to=/app/myapp/some&lt;/CODE&gt;,  &lt;/P&gt;

&lt;P&gt;you'd have this, which would send the user to the default search UI where the full search will run. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;return_to=/app/myapp/flashtimeline?q=search &amp;lt;your search expression here&amp;gt;&amp;amp;earliest=&amp;lt;your earliest time&amp;gt;&amp;amp;latest=&amp;lt;your latest time&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If you use the Sideview Utils modules and familiarize yourself with the techniques those modules provide for linking between views, then you'll have a lot more flexibility. For one thing you can link to a view that doesnt just have a giant search bar - it could itself have an editable Textfield or Pulldown for that "F" value.   &lt;/P&gt;

&lt;P&gt;Then your &lt;CODE&gt;return_to&lt;/CODE&gt; would look more like `return_to=/app/myapp/someView?F=&lt;SOME value=""&gt;&amp;amp;earliest=&lt;EARLIEST time=""&gt;&amp;amp;latest=&lt;LATESTTIME&gt;,  and you could refer to that F value anywhere in the target view's searches or in it's headers just as $F$.      &lt;/LATESTTIME&gt;&lt;/EARLIEST&gt;&lt;/SOME&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps.  If you do decide to use &lt;A href="http://splunk-base.splunk.com/apps/22279/sideview-utils"&gt;Sideview Utils&lt;/A&gt;, within the app itself there's a lot more documentation about these techniques and many more. &lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2011 20:27:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91851#M4999</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2011-10-14T20:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to xml view from iframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91852#M5000</link>
      <description>&lt;P&gt;Hi Nick, &lt;BR /&gt;
thanks for you answer, I do not want to redirect the users to the default search UI, instead I need only to show them the result right on the page. having the view the way indicated in &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Developer/3rdParty"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Developer/3rdParty&lt;/A&gt; is giving exactly what I need however I would like to extend that to supply F on the fly. I am trying to create forms however what I am getting back is a full search form which I don't want, I probably want to have a drop down menu where users can select F as example and I then can pass that somehow to my view which returns a chart.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 16:59:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91852#M5000</guid>
      <dc:creator>firasarabo</dc:creator>
      <dc:date>2011-10-18T16:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: pass a parameter to xml view from iframe</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91853#M5001</link>
      <description>&lt;P&gt;by the way, I am reading on sideview, it looks it has what I need to do.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 17:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/pass-a-parameter-to-xml-view-from-iframe/m-p/91853#M5001</guid>
      <dc:creator>firasarabo</dc:creator>
      <dc:date>2011-10-18T17:10:45Z</dc:date>
    </item>
  </channel>
</rss>

