I followed this steps but I am having trouble updating the Person field.
https://plumsail.com/docs/forms-sp/how-to/document-meta.html
Need assistance.
var listOrLibrary = 'SPDataTable3';
var docLibraryTitle = 'Project Documents';
fd.spRendered(function() {
fd.control(listOrLibrary).$on('filesUploaded',
function(itemIds) {
//get document library by Title
var library = pnp.sp.web.lists.getByTitle(docLibraryTitle);
//go through each uploaded Item Id and set field values
library.getListItemEntityTypeFullName().then(function(entityTypeFullName){
var batch = pnp.sp.web.createBatch();
for(var i = 0; i < itemIds.length; i++){
//specify which fields to update and how
library.items.getById(itemIds[i]).inBatch(batch).update({
Approver: fd.field('Approver1').value.DisplayText
}, "*", entityTypeFullName);
alert(fd.field('Approver1').value.DisplayText);
}
batch.execute().then(function(){
fd.control(listOrLibrary).refresh();
});
});
});
});