Dashboards & Visualizations

Html Panel form: How to create a table with two columns with the right column having dynamic value?

Deepz2612
Explorer

Hi,

My requirement is to:
Create a table with two columns with left column having static data and right having dynamic value
The right dynamic value - meaning I wanted to see only the result of a Splunk query.

I used the follow code but unable to achieve it.

 <row>
    <panel>
      <title>Sample Template</title>
      <html>
        <table border="1" width="1000" padding="10px">
          <th>
            <tr>
              <th width="200" align="left">Impacted time window(in EST)</th>
              <th width="800" align="left">
                <panel>
                  strptime($search_earliest$, "%Y-%m-%d %H:%M:%S.%3N") to strptime($cmd_time.latest$, "%Y-%m-%d %H:%M:%S.%3N")

                </panel>

                </th>
            </tr>
            <tr>
              <th width="200" align="left">Success rate(Total and Regionwise) during Impact Window </th>
              <th width="800" align="left">
                <row>
                <panel>$country$</panel>
                </row>
                </th>
            </tr>
            <tr>
              <th width="200" align="left">Impact to Customer</th>
              <th width="800" align="left">Row - 3 - 2nd column</th>
            </tr>
            <tr>
              <th width="200" align="left">Error code(incase of IOT)</th>
              <th width="800" align="left">Row - 2 2nd column</th>
            </tr>
            <tr>
              <th width="200" align="left">Analysis</th>
              <th width="800" align="left">Enter your analysis details</th>
            </tr>
            <tr>
              <th width="200" align="left">Action taken</th>
              <th width="800" align="left">SMS delay has been added in Canada RTS ticket</th>
            </tr>
            <tr>
              <th width="200" align="left">Next Steps</th>
              <th width="800" align="left">will continue to monitor for next 1 hour</th>
            </tr>
            <tr>
              <th width="200" align="left">Advisory</th>
              <th width="800" align="left"> N/A </th>
            </tr>
            <tr>
              <th width="200" align="left">L1POE bridge opened(Yes/No)</th>
              <th width="800" align="left">Row - 3 - 2nd column</th>
            </tr>
            <tr>
              <th width="200" align="left">L1POE bridge detail</th>
              <th width="800" align="left">Row - 2 2nd column</th>
            </tr>

          </th>
        </table>
      </html>
    </panel>
  </row>
  <row>
    <panel>
      <html>
        <div align="right">
          <b>Dashboard Version 3.7</b>
        </div>
      </html>
    </panel>
  </row>
</form>

In the above - if you could see,my out is not displaying the time for Impacted time window(in EST) instead it is displaying the entire string I have given ( strptime($search_earliest$, "%Y-%m-%d %H:%M:%S.%3N") to strptime($cmd_time.latest$, "%Y-%m-%d %H:%M:%S.%3N")).

Kindly help me with it.

Note : I do not have permissions and access to use Splunk dashboard app.

Tags (2)
0 Karma

niketn
Legend

@Deepz2612 you can use JS to convert search result data to html table as per your need. Refer to my older answer:

https://answers.splunk.com/answers/662523/how-to-show-table-result-in-one-page-table-modific.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

Deepz2612
Explorer

Thanks..
But my requirement is to put in a tabular format.

In the above code that i have share,whatever search query that i give is getting printed as as table value rather than printing the result of the query.

Could you kindly help

0 Karma

Deepz2612
Explorer

Hi,

Could you kindly help please

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...