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 pass parameter to function from section

SA-8350

Summary



You are trying to pass a parameter to a JavaScript (JS) function from a button control inside section, but the parameter is not updated for the function when the function is called.

Error Messages



"The parameter is not set."

Steps to Reproduce



1. Create a JS function which accepts the parameter
2. Add this script to harness
3. Add a button control in the section and add this section to harness mentioned above
4. In the section use the onclick event and choose action as function
5. Call the parameterized function from the section and pass clipboard property as parameter to function
6. Check by alert or logging if parameter is passed sucessfully or not.


Root Cause



The root cause of this problem is a defect in customer application code/rules. The customer's JavaScript did not include the parameter name as a parameter in the function declaration - just as a local variable, so the variable was not being set.

Resolution



This issue is resolved through the following local change: Add the parameter name to the function declaration and the parameter was passed successfully.

Published January 31, 2016 - 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