This is the sample code that needs little changes with respect to date.
<label>Product Notes - Lookup Updater</label>
<fieldset submitButton="true" autoRun="true">
<input type="text" token="Tcount" searchWhenChanged="true">
<label>Search Tcount:</label>
<default>%</default>
<initialValue>%%</initialValue>
</input>
<input type="dropdown" token="Sarcasm_Category" searchWhenChanged="false">
<label>Enter Sarcasm_Category:</label>
<default>*</default>
<initialValue>*</initialValue>
<choice value="True Positive">True Positive</choice>
<choice value="True Negative">True Negative</choice>
<choice value="True Neutral">True Neutral</choice>
<choice value="*">*</choice>
</input>
<input type="dropdown" token="Product_Category" searchWhenChanged="false">
<label>Enter Product_Category:</label>
<default>*</default>
<initialValue>*</initialValue>
<choice value="ApplePay">ApplePay</choice>
<choice value="ATM">ATM</choice>
<choice value="ContactCenter">ContactCenter</choice>
<choice value="EFTPOS">EFTPOS</choice>
<choice value="InternetBanking">Internet Banking</choice>
<choice value="PhoneBanking">Phone Banking</choice>
<choice value="Others">Others</choice>
<choice value="*">*</choice>
</input>
<input type="time" token="time" searchWhenChanged="true">
<label>Twiiter Time</label>
<default>
<earliest>@d</earliest>
<latest>now</latest>
</default>
</input>
</fieldset>
<row>
<panel>
<table>
<search>
<query>index=au_skillmatrix_mssql_dbx OR index=au_socialmedia* sourcetype=twitter_prod_data | dedup Tcount | eval Time = strptime(AuTime,"%Y-%m-%d %H:%M:%S") |eval DATE = strftime(Time,"%d-%m-%Y %H:%M:%S")
| eval check = "%$Tcount$%" |eval _lock="No"
| eval Sarcasm_Category="$Sarcasm_Category$" |eval today=strftime(now(),"%Y-%m-%d") |eval TODAY = strftime(Time,"%Y-%m-%d")
| eval Product_Category="$Product_Category$" |eval _lock = if(check = "%%%","Yes","No")
| table TweetText Sentiment Tcount DATE Sarcasm_Category Product_Category _lock TODAY today
| join [rest /services/authentication/current-context/context | search NOT username="splunk-system-user"
| head 1 | fields username]
| table TweetText Sentiment Tcount DATE Sarcasm_Category Product_Category _lock username TODAY today|where Tcount like "%$Tcount$%" |where _lock= "No" |where TODAY = today
| inputlookup append=true product_notes.csv
| dedup Tcount
| outputlookup product_notes.csv
| table TweetText Sentiment Tcount DATE Sarcasm_Category Product_Category _lock username |where Tcount like "%$Tcount$%"
| sort -DATE</query>
<earliest>@d</earliest>
<latest>now</latest>
</search>
<option name="list.drilldown">full</option>
<option name="list.wrap">1</option>
<option name="maxLines">5</option>
<option name="raw.drilldown">full</option>
<option name="rowNumbers">true</option>
<option name="table.drilldown">1</option>
<option name="table.wrap">1</option>
<option name="type">list</option>
<option name="wrap">true</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="count">1000</option>
</table>
</panel>
</row>
</form>
... View more