Splunk Dev

How can I concatenate multiple variables in SplunkJS script?

clement
Explorer

How can I concatenate multiple variables in SplunkJS script?

e.g:
var date = Date.now();
var alertid = 12345;
var filename = date.concat("_").concat(alertid).concat(".txt");

do I need to import any library?

0 Karma
1 Solution

hardikJsheth
Motivator

You can use + for concatenating two strings.

newlabel = newlabel +"<font color=\"red\" face=\"verdana\">*</font>";

View solution in original post

0 Karma

hardikJsheth
Motivator

You can use + for concatenating two strings.

newlabel = newlabel +"<font color=\"red\" face=\"verdana\">*</font>";
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...