All Apps and Add-ons

Copy Value From Table to ClipBoard

ho000dor
Explorer

Hello,

I have a table module that passes data to an html module. I was wondering if when the user clicks the data, the field value can be automatically copied to the users clipboard and another URL opened? I don't want to pass any values to the other URL.

search TESTSEARCH | table TEST_URL

10

$row.fields.TEST_URL$]]>

sideview
SplunkTrust
SplunkTrust

It would be awesome if Javascript could do this, but it cannot. Not directly, and it's more of a security thing.

Which leaves two kinds of solutions, broadly speaking
1) solutions which rely on some external component like Flash or Java or activeX and so on and so forth.
2) solutions that display the text to the user, and select it for them, and that tell them to type Ctrl-C.

Both of these directions are pretty lame... The first one is outright horrifying and I really really do not advise it, and the second one is just awkward usability.

If you can tell me more about the use case, there might be another way. For example if the content needs to be POST'ed to the page in question rather than being sent as a mere GET argument, there are ways to do that. Or we could do some pretty powerful things with a custom python controller. The devil is in the details.

ho000dor
Explorer

The solution i'm trying to achieve is with the table module. The table content includes lookup values. The content is contact info that is used on another URL. I can copy the value no problem and paste it in the destination URL but i'm lazy and have had good fortune with splunk so far.

Also, the destination URL doesn't contain anything in the URL that would reference the contact info so click param in the redirector module might not be the answer. This is not important, its just to remove some monotony from the users job and seems like a fun experiment.

0 Karma

ho000dor
Explorer
<module name="Search" group="TEST">
<param name="search">search TESTSEARCH | table TEST_CONTENT</param>
<module name="Table" layoutPanel="panel_row3_col1">
<param name="count">10</param>


<module name="HTML" group="row.fields.TEST_CONTENT">
<param name="html"><![CDATA[<a href="$row.fields.TEST_CONTENT$">$row.fields.TEST_CONTENT$</a>]]></param>
</module> 
</module> 
</module>
0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...