Last activity: 30 Nov 2018 1:44 EST
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.
This might be helpful
No, have you even read the post? Just replying with links without getting into the topic would never help.
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.
Did you try using "pega.u.d.getProperty"?
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.
Another option would be to consider running an activity to retrieve the property value. If you want to try that and see if that helps.
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).