Support Article
Checkboxes are not selected though values display on Clipboard
SA-93119
Summary
Checkboxes are not selected on the PDF generated though the values are available on the Clipboard. However, the checkboxes are selected on the User Interafce (UI) at runtime.
Error Messages
Not Applicable
Steps to Reproduce
- Generate a PDF using the HTMLToPDF activity
- Pass the HTML stream as the rule-obj-HTML rule
- Include a non auto generated section
- Select the checkbox based on a Java code
Root Cause
An issue in the custom application code or rules. Syntax issue with retrieving values from the Clipboard page. The if condition (a==true) evaluates the issue incorrectly.
Resolution
Perform the following local-change:
Retrieve the Clipboard property values using the below Java code:
ClipboardProperty x = tools.findPage("pyWorkPage").getProperty("pageListProperty");
For iterating the pagelist use below logic
java.util.Iterator itr = x.iterator()
To get each property in the each page list
while (itr.hasNext())
{
ClipboardProperty y = (ClipboardProperty)itr.next();
ClipboardPage z = y.getPageValue();
propsVal = z.getString(".propLabel");//returns true or false
if("true".equalsIgnoreCase(propsVal)){
}
}
Published January 14, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.