Support Article
listtolist control is empty when source list has only one value
SA-38602
Summary
When pagelist has only one record, in listtolist control in UI, it shows empty but clipboard has value.
Error Messages
Not Applicable
Steps to Reproduce
1.Create a section with List to List control with source as clipboard page.
2.Run case.
3.Observe when source page has only one value, then list is empty in UI.
Root Cause
A defect in Pegasystems’ code or rules:
While preparing list of UI elements , there is a check in listtolist js API as:
if(this.aSource.length == 1 && this.aSource[0] && typeof(this.aSource[0][this.sDisplayProperty]) =="undefined"){
this.aSource.splice(0,1);
}
Here if sourceObject.display property is undefined and source list length is one, then it removes the object from source.
In this case display property is AccountID and object has property as AccountId, so if condition is true which in turn removes the object.
In other cases since list length more than one, it is skipping the 'if' check.
Resolution
Perform the following local-change:Change the display property of listtolist control from AccountID to AccountId.
Published July 5, 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.