Get value from Clipboard from JavaScript
How to get a value from Clipboard in JS text file? There is an API for setValue, but how to read that value back after setting?
Take into account that this is not a Section or Control rule - just JS text file. So looks like I cannot use <pega:reference> and <%=> tags there since those are for JSP only.
-
Like (0)
-
This might be helpful
https://collaborate.pega.com/question/can-we-retrieve-value-clipboard-using-javascript-api

Event i am trying to search for the same, but could not get any useful links for getting property value directly in JS file without using JSP.

Hi Pankaj,
Could you please provide an example for the same

var propValue = pega.u.d.getProperty("propertyName");
var propValue = pega.u.d.getProperty("propertyName", "pageName");
Just make sure these properties are present in the UI also since this is a client side api. If you need something from server side (which is only on clipboard page) you can use safeURL to invoke activity in async mode and get the value.

just as some addition - there's "hidden" control available to handle such use cases. You need to have this property exposed in UI - if you don't need it to show up in your UI, this is the best approach to use.

Please note, in this case you need request to server, what's more this property will be fetched from Clipboard. In case of client-side changes of this property they could have different value on server (until you submit the form).