Thanks, I ended up changing the JS to the below, btu it only creates the empty file for test99 and doesn't import the files in the SFTP. // Function to create PBfunction createPB(pbContents, label, internalName) { //var newPB = xtkQueryDef.create("nms:includeView|6580"); // ID 65447 formerly nms...