Support Article
Unable to pass value to Textbox in SharePoint application
SA-102708
Summary
Unable to pass a value to a Textbox in the SharePoint application.
Error Messages
Not Applicable
Steps to Reproduce
Use the Set Text method to set the value in the People Picker Text field.
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Perform the following local-change:
Add the below JavaScript in the UserWorkForm:
function setValue(name,field){
var _PeoplePicker = document.querySelector("div[title='"+field+"']");
var _PeoplePickerTopId = _PeoplePicker.id;
var _PeoplePickerEditer = document.querySelector("input[title='"+field+"']");
_PeoplePickerEditer.value = name;
var _PeoplePickerOject = SPClientPeoplePicker.SPClientPeoplePickerDict[_PeoplePickerTopId];
_PeoplePickerOject.AddUnresolvedUserFromEditor(true);
}
Tags:
Published April 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.