Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Unable to set Clipboard page property to variable in external JS



Unable to set a Clipboard page property to variable in external JavaScript file.

Error Messages

Not Applicable.

Steps to Reproduce

  1. Create a Text (JS) file and code the statement
  2. Add the Pega tag inside the JS file and assign it to a variable
  3. Run the JS file. The Pega reference tag is not resolved

Root Cause

Pega JavaServer Pages (JSP) tag is not recognized in the external JS file. Thus, the user was unable to get the Clipboard page value using the Pega tag inside JS file. 


Perform the following local-change: 
  1. Inside a UserWorkForm create a variable and get the value from the Clipboard:
       var testvar = '<%= tools.findPage("pxRequestor").getIfPresent(".pxReqLocale").getStringValue(); %>';

  2. Refer the above testVar in the JS file


Published January 4, 2019 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us