<?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: Table dynamic datasource in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712035#M58245</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/276614"&gt;@kemeris&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive been having a play around with this, the only way I can make this work is using Saved Searches, as follows:&lt;/P&gt;&lt;P&gt;Create saved searches for each platform in a format such as "MySearch - $platform$" (e.g. MySearch - Amazon)&lt;/P&gt;&lt;P&gt;Create a dropdown with multiple options, each of which the value is set to the name of your saved searches (e.g. Name: Amazon, Value: MySearch - Amazon). Assume the name of your Dropdown is "ds_token"&lt;/P&gt;&lt;P&gt;Create a base search in dashboard studio with the following search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| savedsearch $ds_token|s$&lt;/LI-CODE&gt;&lt;P&gt;The |s (Pipe "S") will enclose the name in quotes.&lt;/P&gt;&lt;P&gt;This will then load your saved search with the name set in the value of the dropdown when selected.&lt;/P&gt;&lt;P&gt;You can use this search throughout your dashboard, or chain additional searches as required.&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider accepting this answer or adding karma this answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2025 21:35:41 GMT</pubDate>
    <dc:creator>livehybrid</dc:creator>
    <dc:date>2025-02-19T21:35:41Z</dc:date>
    <item>
      <title>Table dynamic datasource</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/711987#M58242</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;I have drop-down named &lt;SPAN&gt;"Program" and Table with static datasource &lt;/SPAN&gt;&lt;SPAN&gt;"ds_EHYzbg0g". How to define &lt;EM&gt;dataSource for Table dynamically based on value from drop-down "Program"?&lt;/EM&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "options": {
        "items": [
            {
                "label": "All",
                "value": "*"
            }
        ],
        "defaultValue": "*",
        "token": "select_program"
    },
    "dataSources": {
        "primary": "ds_8xyubP1c"
    },
    "title": "Program",
    "type": "input.dropdown"
}

{
    "type": "splunk.table",
    "options": {
        "tableFormat": {
            "rowBackgroundColors": "&amp;gt; table | seriesByIndex(0) | pick(tableAltRowBackgroundColorsByTheme)"
        },
        "columnFormat": {
            "_raw": {
                "data": "&amp;gt; table | seriesByName(\"_raw\") | formatByType(_rawColumnFormatEditorConfig)"
            }
        },
        "count": 50
    },
    "dataSources": {
        "primary": "ds_EHYzbg0g"
    },
    "context": {
        "_rawColumnFormatEditorConfig": {
            "string": {
                "unitPosition": "after"
            }
        }
    },
    "showProgressBar": true,
    "containerOptions": {},
    "showLastUpdated": false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 10:16:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/711987#M58242</guid>
      <dc:creator>kemeris</dc:creator>
      <dc:date>2025-02-19T10:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Table dynamic datasource</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/711997#M58243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/276614"&gt;@kemeris&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are the program you want to filter by in the data source? Or do you need to load a completely different data source depending on the dropdown selection?&lt;/P&gt;&lt;P&gt;Assuming you want to apply a filter to the search based on the dropdown value you would do something like this:&lt;/P&gt;&lt;PRE&gt;index=yourData platform=$platform$&lt;/PRE&gt;&lt;P&gt;Please let me know how you get on and consider accepting this answer or adding karma this answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 13:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/711997#M58243</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-02-19T13:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Table dynamic datasource</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712003#M58244</link>
      <description>&lt;P&gt;Thank you for you reply. I need completely different data source for Table depending on the dropdown selection.&lt;/P&gt;&lt;P&gt;If value selected in dropdown is equal to "caddy", set Table datasouce to "ds_EHYzbg0g", if value is "nginx", set Table datasouce to "ds_8xyubP1c":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ds_EHYzbg0g":&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "type": "ds.search",
    "options": {
        "query": "host=\"$select_hosts$\" program=\"$select_program$\" priority=\"$select_log_leel$\" | fields host,program,sourceip"
    },
    "name": "logs_program_caddy"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 14:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712003#M58244</guid>
      <dc:creator>kemeris</dc:creator>
      <dc:date>2025-02-19T14:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Table dynamic datasource</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712035#M58245</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/276614"&gt;@kemeris&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive been having a play around with this, the only way I can make this work is using Saved Searches, as follows:&lt;/P&gt;&lt;P&gt;Create saved searches for each platform in a format such as "MySearch - $platform$" (e.g. MySearch - Amazon)&lt;/P&gt;&lt;P&gt;Create a dropdown with multiple options, each of which the value is set to the name of your saved searches (e.g. Name: Amazon, Value: MySearch - Amazon). Assume the name of your Dropdown is "ds_token"&lt;/P&gt;&lt;P&gt;Create a base search in dashboard studio with the following search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| savedsearch $ds_token|s$&lt;/LI-CODE&gt;&lt;P&gt;The |s (Pipe "S") will enclose the name in quotes.&lt;/P&gt;&lt;P&gt;This will then load your saved search with the name set in the value of the dropdown when selected.&lt;/P&gt;&lt;P&gt;You can use this search throughout your dashboard, or chain additional searches as required.&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider accepting this answer or adding karma this answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 21:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712035#M58245</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-02-19T21:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table dynamic datasource</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712070#M58250</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you, your solution almost works.&lt;/P&gt;&lt;P&gt;I have saved search "dashboard_linux_logs_table_caddy":&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;host="$select_hosts$" program="$select_daemon$" priority="$select_log_level$" | fields _time,program&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Dashboard Studio DataSource:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;    "dataSources": {
        "ds_dashboard_linux_logs_table": {
            "type": "ds.search",
            "options": {
                "query": "| savedsearch \"dashboard_linux_logs_table_$select_daemon$\" select_hosts=\"$select_hosts$\" select_daemon=\"$select_daemon$\" select_log_level=\"$select_log_level$\""
            },
            "name": "dashboard_linux_logs_table"
        }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When changing drop-down value (token: select_daemon), table does pick up right savedsearch. The only problem query parameter "| fields _time,program" of savedsearch is ignored. Still looking for solution.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 09:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712070#M58250</guid>
      <dc:creator>kemeris</dc:creator>
      <dc:date>2025-02-20T09:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Table dynamic datasource</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712074#M58251</link>
      <description>&lt;P&gt;replaced&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields _time,program&lt;/LI-CODE&gt;&lt;P&gt;with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table _time,program&lt;/LI-CODE&gt;&lt;P&gt;and everything is working as expected. I really appreciate you help &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 10:20:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Table-dynamic-datasource/m-p/712074#M58251</guid>
      <dc:creator>kemeris</dc:creator>
      <dc:date>2025-02-20T10:20:08Z</dc:date>
    </item>
  </channel>
</rss>

