Posts

Showing posts from December, 2015

Reset people picker value in SharePoint using JQuery

Use the following code to reset the people picker control value using JQuery: Pass the title of the people picker to the below function and it will reset the people picker control value. function clearPeoplePickerControl(ppTitle) { var identifier = $("div[title='" + ppTitle + "']").attr("ID")); ; var value = ''; var tags = document.getElementsByTagName('DIV'); for (var i = 0; i < tags.length; i++) {   var tempString = tags[i].id;  if ((tempString.startsWith(identifier)) && (tempString.indexOf('_upLevelDiv') > 0)) {       tags[i].innerHTML = value;      break; }
Promote Multiple-Selection list box values with coma saperated value to Form Library Suppose, in InfoPath 2010 form with a Multiple-Selection List Box that's pulling in data from a SharePoint list. To publish form and promote Multiple-Selection List Box to library, please follow the below steps: 1. Named multiple selection field Field1. Add 1 more hidden text fields: Field2. 2. Add this formula as the default value for Field2. xdMath:Eval(xdMath:Eval(/my:myFields/my:group1/my:field1, 'concat(., ",")'), "..") Here "/my:myFields/my:group1/my:field1" is my multiple selection field, please replace the XPath for yours. or substring(eval(eval(field6[. != ""], 'concat(",", .)'), ".."), 2) 3. Done. Field2 is the field we need to publish as SharePoint column.