Dashboards & Visualizations

uncheck automatically the box JOB_numbers by clicking on button '' save ''

fdi01
Motivator

hi.
alt text

I have a dashboard as above, in which I can choose job_number then make updated on the JOB corresponding to job_number.
My problem is: once the updated perform on the job, I love that each time I click on the button '' save '', my JOB change are save and JOB_numbers marks above are uncheck automatically as the scheme below.

alt text

NB: uncheck the JOB_numbers is the real problem that I have at this time because the sauvgarde JOB change is OK.

Tags (1)
0 Karma

jkat54
SplunkTrust
SplunkTrust

Try changing this section of your xml

             <condition match=" '$newstatus$ == Closed'">
               <unset token="TicketNumber1"></unset>
             </condition>

To:

             <condition match="'$newstatus$' == Closed">
               <unset token="TicketNumber1"></unset>
             </condition>

I changed your match very slightly...

0 Karma

NOUMSSI
Builder

Hi,
If Iunderstand you very well, you want that once you've check save box, you want that selected TicketNumbers become automatically uncheck. Is it so?

0 Karma

frobinson_splun
Splunk Employee
Splunk Employee

Hi @fdi01,
Would you be willing to post the XML for your dashboard? For troubleshooting, it could be helpful to see how it is set up to handle various inputs and actions.
Thanks,
@frobinson_splunk

0 Karma

fdi01
Motivator

this is a XML example

<form script="custom.js">
  <label>NEW TICKET NEW PAGE DRILLDOWN</label>
  <fieldset submitButton="false">

  </fieldset>
  <search>
    <query>$save$</query>
  </search>

  <row>
    <panel>
      <html>
        <h3 style="color:green;text-align:center"> IF YOU WANT TO UPDATE A JOB_Numbers FROM THIS PAGE, YOU CAN DIRECTLY SET NEW VALUES BELOW  </h3> 
    </html>
    </panel>
  </row>
  <row>
    <panel>
      <input type="checkbox" token="TicketNumber1" searchWhenChanged="true">
        <label>check JOB_Numbers you want update</label>
        <!-- The final value will be surrounded by prefix and suffix -->
        <prefix>(</prefix>
        <suffix>)</suffix>
        <!-- Each value will be surrounded by the valuePrefix and valueSuffix -->
        <valuePrefix>TicketNumber="</valuePrefix>
        <valueSuffix>"</valueSuffix>
        <!-- All the values and their valuePrefix and valueSuffix will be concatenated together with the delimiter between them -->
        <delimiter> OR </delimiter>
        <search>
          <query>index=_internal|stats c by sourcetype|rename sourcetype as TicketNumber </query>
        </search>
        <fieldForLabel>JOB_Number</fieldForLabel>
        <fieldForValue>TicketNumber</fieldForValue>
      </input>
    </panel>
    <panel>
      <title>Update:  generate by  JOB_NUMBER</title>
      <input type="text" token="TicketNumber1" searchWhenChanged="true">
        <label>JOB_Number</label>
        <default></default>
      </input>
      <input type="text" token="comment2" searchWhenChanged="true">
        <label>Update the comment</label>
      </input>
      <input type="dropdown" token="newstatus" searchWhenChanged="true">
        <label>Change the JOB status Update:</label>
        <choice value="Open">Open</choice>
        <choice value="Closed">Closed</choice>
        <choice value="In progress">In progress</choice>
        <default></default>
      </input>
      <input type="checkbox" searchWhenChanged="true">
        <label>Save your changes</label>
        <choice value="+ 2">save</choice>
        <default></default>
        <change>
          <condition value="*">
            <set token="save">index=_internal $TicketNumber1$
              |eval status="$newstatus$"   |eval TicketNumber="$TicketNumber1$"         
              |eval Comments="$comment2$" |table TicketNumber status Comments
           |collect index=ticket marker="report=\"ticket1\""</set>
            <condition match=" '$newstatus$ == Closed'">
              <unset token="TicketNumber1"></unset>
            </condition>

          </condition>
        </change>
      </input>
      <table>
        <title>JOB UPDATE</title>
        <search>
          <query>index=_internal $TicketNumber1$
              |eval status="$newstatus$"   |eval TicketNumber="$TicketNumber1$"         
              |eval Comments="$comment2$" |table TicketNumber status Comments 
          </query>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">row</option>
        <option name="count">5</option>
      </table>
    </panel>
  </row>
</form>

frobinson_splun
Splunk Employee
Splunk Employee

Thanks--could you comment on how the custom.js script you are loading at top of this XML might handle/manage the behavior of the dashboard? If you can post the script or describe it, that would be helpful.

0 Karma

fdi01
Motivator

custom.js script is use to make the discretbar chart on my dashbord.
thx.

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...