HI, appear to be having two issues.
I have a default value in my Title column, but when I open a new form, the default value is not populated. Is this by design?
In my spBeforeSave function, I have two PnP calls (one is a list item GET, one is a list Item UPDATE) the GET call gets a value from another list, which I then use to populate the Title field, however after saving the field is blank. I have something like the below:
var projNumber = window.top.fd.field(‘Title’).value; //get value from parent form, this one is in dialog
var settingNumber = item.SettingValue; //set my value from the item I got
var invNumber = ‘INV-’ + projNumber + ‘-’ + settingNumber; // concatenate string
invNumber = invNumber.toString(); // make sure its a string
fd.field(‘Title’).value = invNumber; // set title field
After this another call updates the same item in the MASTER_ID list, but I removed that for the time being as I thought it might have been causing the field to blank out, but same behaviour is observed whether I do or not.
It would appear that the function above is somehow blanking the field, however when I debug this function it works ok, right until the moment the item is saved. Can you advise what I’m doing wrong?