Support Article

Not able to pass comma separated string constant to Autocomplete

SA-34299

Summary



The user has an autocomplete with source as Report Definition which has one input parameter. The user is not able to pass comma separated parameter values. Test Compilation error is thrown while saving the section.


Error Messages


This record has 1 error(s) in 1 place(s) .
Test compilation failed: ----------
1. ERROR in /Rule_HTML_Section_OUAKEQ_Gudam_Work_TestCase_TestStep1_Stream_20170224T095024_146_GMT.java (at line 338)
pyReportDefParams.put("pyValue","\\"Africa\\",\\"Asia\\"");
^^^^^^^^^^^^^^^^^^^^^
Syntax error on tokens, delete these tokens
----------
1 problem (1 error)
Compile failed.


Steps to Reproduce

  1. Have a Report definition has parameter of type text passed to a column and the results in the autocomplete are displayed based on the parameter value
  2. Add autocomplete with this report definition as source.
  3. In the autocomplete pass the parameters as "\"ParameterA\",\"ParameterB\""


PFB the image of the autocomplete configuration.


Root Cause



A defect in Pegasystems’ code or rules.
Double escaping is happening in the given scenario.

Resolution



Apply HFix-31369
Description of Changes
Added code to handle double quotes in the parameters.
Now user can pass parameters in this below format

"\"ParameterA\",\"ParameterB\""

Additional Installation steps:
A server restart is requires for the hotfix changes to get reflected.

Published March 1, 2017 - Updated October 8, 2020

Have a question? Get answers now.

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