All Apps and Add-ons

Can i display only certain number of character in a cells of a table?

royimad
Builder

Hello I'm using sideview table and i need to know id i can limit the display of a cells for a certain number of characters?

Code:

<!--  EXAMPLE BEGIN  -->
<module name="Search" layoutPanel="panel_row1_col1" autoRun="True">
  <param name="search">
  index=_internal source="*metrics.log" group="per_sourcetype_thruput" | stats avg(eps) by series | sort - avg(eps)
  </param>
  <param name="earliest">-12h</param>
  <module name="Pager">
    <param name="count">5</param>
    <module name="Table">
      <module name="HTML">
        <param name="html"><![CDATA[
          <h2>Showing eps over time for sourcetype $row.fields.series$</h2>
        ]]></param>
      </module>
      <module name="Search">
        <param name="search">
          index=_internal source="*metrics.log" group="per_sourcetype_thruput" $row.searchTerms$ | timechart max(eps) avg(eps) min(eps)
        </param>
        <param name="earliest">-12h</param>
        <module name="HiddenChartFormatter">
          <param name="charting.chart">line</param>
          <param name="charting.chart.nullValueMode">zero</param>
          <module name="FlashChart"/>
        </module>
      </module>
    </module>
  </module>
</module>
<!--  EXAMPLE END  -->
1 Solution

sowings
Splunk Employee
Splunk Employee

In the past I've done this with a macro, that took the input string and a number as an argument. It truncated the string to "length minus three" and replaced that with "...", if the string was over that length. Otherwise, the string was left alone.

View solution in original post

sowings
Splunk Employee
Splunk Employee

In the past I've done this with a macro, that took the input string and a number as an argument. It truncated the string to "length minus three" and replaced that with "...", if the string was over that length. Otherwise, the string was left alone.

Get Updates on the Splunk Community!

Splunk Lantern | Spotlight on Security: Adoption Motions, War Stories, and More

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...

Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...

Tech Talk | One Log to Rule Them All

One log to rule them all: how you can centralize your troubleshooting with Splunk logs We know how important ...