<?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: Custom Table format- How to merge cells? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645573#M16488</link>
    <description>&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2023 08:58:40 GMT</pubDate>
    <dc:creator>anissabnk</dc:creator>
    <dc:date>2023-06-13T08:58:40Z</dc:date>
    <item>
      <title>How to merge cells in custom table format?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645370#M16477</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a question for a custom table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to do this, but in Splunk it's not possible to merge cells.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to do this :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anissabnk_0-1685626659785.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25640iA92626DF3C16FA69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anissabnk_0-1685626659785.png" alt="anissabnk_0-1685626659785.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the moment, I made this :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anissabnk_1-1685626712809.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25641iC5F15C084CCB135A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anissabnk_1-1685626712809.png" alt="anissabnk_1-1685626712809.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 13:21:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645370#M16477</guid>
      <dc:creator>anissabnk</dc:creator>
      <dc:date>2023-06-12T13:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Table format- How to merge cells?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645511#M16484</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231839"&gt;@anissabnk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can achieve such a format using your own HTML and CSS.&amp;nbsp; You can try below sample code for your POC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard script="convert_to_html.js"&amp;gt;
  &amp;lt;label&amp;gt;HTML Table from SPL&amp;lt;/label&amp;gt;
  &amp;lt;search id="mySearch"&amp;gt;
    &amp;lt;done&amp;gt;
      &amp;lt;set token="tokHTML"&amp;gt;$result.data$&amp;lt;/set&amp;gt;
    &amp;lt;/done&amp;gt;
    &amp;lt;query&amp;gt;|makeresults count=10 | eval a=1 | accum a | eval NW="NW"+a, P="P"+a, NAOK="NAOK"+a, NAKO="NAKO"+a, TRMOK="TRMOK"+a, TRMKO="TRMKO"+a  | table NW P NAOK NAKO TRMOK TRMKO&amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;div id="htmlPanelWithToken"&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;style&amp;gt;
        .th_td_class {
          background-color: chocolate;
          color: white; 
          text-align: center;
        }
        .td_class {
          background-color: orange;
          color: white;
          border: 2px solid black;
          text-align: center;
        }
        .tr_class {
          background-color: chocolate;
          color: white; 
          text-align: center;
          border: 2px solid black;
        }
        .td_content_class {
          text-align: center;
          border: 2px solid black;
        }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JS&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/simplexml/ready!'
], function ($, mvc,) {
    var mySearch = mvc.Components.get("mySearch");
    var mySearchResults = mySearch.data("results");
    mySearchResults.on("data", function () {
        resultArray = mySearchResults.data().rows;


        $("#htmlPanelWithToken").html("");
        var generateDataContent = "";
        //Iterate Result set
        $.each(resultArray, function (index, value) {
            // Create proper HTML content from result
            // generateHTMLContent = "&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;" + value[1] + "&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;" + value[2] + "&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;";
            //value[1] = data field
            //value[2] = data1 field
            generateDataContent = generateDataContent + `&amp;lt;tr&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;`+ value[0] + `&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;`+ value[1] + `&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;`+ value[2] + `&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;`+ value[3] + `&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;`+ value[4] + `&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;`+ value[5] + `&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;`;
        })

        var generateHTMLContent = `
        &amp;lt;table width="25%"&amp;gt;
        &amp;lt;thead&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td class="tr_class"&amp;gt;F&amp;lt;/td&amp;gt;
                &amp;lt;td class="tr_class"&amp;gt;V&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/thead&amp;gt;
        &amp;lt;tbody&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;N&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;W&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;P&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;P&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;D&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;123&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/tbody&amp;gt;
        &amp;lt;/table&amp;gt;
        &amp;lt;br/&amp;gt;
        &amp;lt;table width="100%"&amp;gt;
        &amp;lt;thead&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td colspan="2"&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td class="tr_class" colspan="2"&amp;gt;NA&amp;lt;/td&amp;gt;
                &amp;lt;td class="tr_class" colspan="2"&amp;gt;TRM&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td class="td_class"&amp;gt;NW&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_class"&amp;gt;P&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_class"&amp;gt;OK&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_class"&amp;gt;KO&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_class"&amp;gt;OK&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_class"&amp;gt;KO&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/thead&amp;gt;
        &amp;lt;tbody&amp;gt;
            `+ generateDataContent + `
        &amp;lt;/tbody&amp;gt;
    &amp;lt;/table&amp;gt;
    &amp;lt;br /&amp;gt;
    &amp;lt;table width="50%"&amp;gt;
        &amp;lt;tbody&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;Total&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;W&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;P&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;11&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;10&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;1111&amp;lt;/td&amp;gt;
                &amp;lt;td class="td_content_class"&amp;gt;2222&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/tbody&amp;gt;
        &amp;lt;/table&amp;gt;

        `;
        $("#htmlPanelWithToken").html(generateHTMLContent);
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-06-02 at 1.49.08 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25657i5D26B8D5547E550D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-06-02 at 1.49.08 PM.png" alt="Screenshot 2023-06-02 at 1.49.08 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 08:19:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645511#M16484</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2023-06-02T08:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Table format- How to merge cells?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645571#M16487</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 13:43:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645571#M16487</guid>
      <dc:creator>anissabnk</dc:creator>
      <dc:date>2023-06-05T13:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Table format- How to merge cells?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645573#M16488</link>
      <description>&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 08:58:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645573#M16488</guid>
      <dc:creator>anissabnk</dc:creator>
      <dc:date>2023-06-13T08:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Table format- How to merge cells?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645590#M16492</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231839"&gt;@anissabnk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please let me know where you placed the JS file in your app? It should be at&amp;nbsp;&lt;STRONG&gt;$SPLUNK_HOME/etc/apps/&amp;lt;app_name&amp;gt;/appserver/static/&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;directory.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After updating a javascript file that is already being used in Dashboard, reload the code through a bump on the search head by visiting this page:&lt;BR /&gt;&lt;A href="https://my.search.head/en-US/_bump" target="_blank"&gt;https://my.search.head/en-US/_bump&lt;/A&gt; and click on the bump button.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;KV&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 17:14:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/645590#M16492</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2023-06-02T17:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Table format- How to merge cells?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/646654#M16561</link>
      <description>&lt;P&gt;Thank you so much for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 13:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/646654#M16561</guid>
      <dc:creator>anissabnk</dc:creator>
      <dc:date>2023-06-12T13:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge cells in custom table format?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/646778#M16572</link>
      <description>&lt;P&gt;I still need help please &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;., if you can help me &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The table must display all available time slots for the current day. For example, if the table is consulted at 1:45pm, only time slots 00-01 to 12-13 will be visible for the day's data.&lt;/P&gt;&lt;P&gt;My log looks like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;2023-06-13 08:55:00.385, nom_ws="WS-INT-LIENS", date_appel="2023-06-13", partenaire="0000003064", temps_rep_max="343", temps_rep_min="343", temps_rep_moyen="343", nb_appel="1", statut="OK", tranche_heure="9-10"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 08:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-merge-cells-in-custom-table-format/m-p/646778#M16572</guid>
      <dc:creator>anissabnk</dc:creator>
      <dc:date>2023-06-13T08:53:41Z</dc:date>
    </item>
  </channel>
</rss>

