Splunk Search

dbxquery not able to update value

lmjoin115
Explorer

Hello Team , i try to pass value of time token in dbxquery to update current time , it not working. Without it is working fine

 

 

<form hideSplunkBar="true" hideEdit="false" script="submit_date.js">
<label>Cloud Studio - Migration Scheduler testing</label>

<init>
<set token="tokFromDate"></set>
<set token="tokToDate"></set>
<set token="defaut_time">$result.today$</set>
</init>

<search>
<query>| makeresults|eval today=strftime(_time,"%Y-%m-%dT%H:%M")|fields - _time</query>
<done>
<set token="defaut_time">$result.today$</set>
</done>
</search>
<search>
<query>|dbxquery connection="CloudAssessment2" query="UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_start_date='$tokFromDate$', [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_end_date='$tokToDate$', [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_current_date='$result.today$' WHERE [Cloudstudio2].[dbo].integrated_assessment_mgl.app_group=$tok_Application_Group$ AND [Cloudstudio2].[dbo].integrated_assessment_mgl.waves=$Waves$; UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_start_date = REPLACE(pl_start_date,'T',' '); UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_end_date = REPLACE(pl_end_date,'T',' '); UPDATE [Cloudstudio2].[dbo].integrated_assessment_mgl SET [Cloudstudio2].[dbo].integrated_assessment_mgl.pl_current_date = REPLACE(pl_current_date,'T',' '); " | dbxoutput output="integrated_assessment_mgl_date"; </query>
<earliest>0</earliest>
<latest></latest>

Tags (1)
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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...