Hi, I have been following theese 2 tutorials for implementing Cascading dropdowns & Update uploaded files and it works as expected, until it comes to setting Lookup fields manually.
I am fetching selected "Disciplin" value and try to send it Library fileUpload in picture below.
No matter how I try to update the Library it wont work for Lookup fileds. Selected item value is not sent to Library below.
It works fine for regular Text input fields but not for Lookup fields.
I have tried everything i found on this forum without any success,
var listOrLibrary = 'SPDataTable0'; var docLibraryTitle = 'DevTest'; 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({ Disciplin: fd.field('Disciplin').value //<<< Field value is not added to Library!! }, "*", entityTypeFullName); } batch.execute().then(function(){ fd.control(listOrLibrary).refresh(); }); }); });