How to click a button to copy data to clipboard in Appian
Discussion posts and replies are publicly visible
This is not supported. Sorry ...
Whilst "not supported" you could write your own custom equivalent. You could add a button, which triggers a saveInto() which stashes whatever data you define into a variable. Depending on where you want to "paste" that data you may stash it in a local! variable or a ri! variable, the latter of which can be mapped to a pv! and thus made re-usable in process, or even stored to a database table and retrievable anywhere else in your application.
I've often found it helpful to add a rich text icon that uses a safelink to your desired URL. In the caption for the icon, tell users they should right click and select 'copy address'
Come on guys, we know the functionality is lurking in the back-end, why not just expose it in an official component already?
agree
a!richTextDisplayField( labelPosition: "COLLAPSED", value: { a!richTextItem( text: ri!textToCopy, style: "STRONG", size: "MEDIUM" ), char(9), a!richTextIcon( icon: "clone-solid", size: "MEDIUM", link: 'type!{http://www.appian.com/ae/types/2009}CopyToClipboardLink'( textToCopy: ri!textToCopy ), linkStyle: "STANDALONE" ) } )
I found this a random post on Linkedin where a user posted this similar code.
Try this !
Myself and another user dug this up in the Appian Subreddit a year or so ago - pretty useful but also super "not officially supported" - I hadn't posted about it here or other public places, partly because all Appian would need to do is change the back-end function name to effectively re-hide it from all of us again (or do something else to prevent it from being arbitrarily called in SAIL code like it currently can be).
Making this an "official" feature (come on a!CopyToClipboardLink() guys! it would be easy!) is on my "official" product backlog request list that I've sent to certain powers-that-be, though as always until I hear anything official I assume it's safely being ignored, LOL.