I think the code for getting the actual User ID is correct but what i'm confused about is how to get the ID of the already filled out People Picker Field.
You can get the Id of the user selected in the Person or Group field using this code:
let web = new Web('RootSsiteUrl');
var userEmail = fd.field('FieldName').value.Description;
web.siteUsers.getByEmail(userEmail ).get().then(function(properties){
alert(properties.Id)
});
let web = new Web('https://qmedicsag.sharepoint.com');
var userEmail = fd.field('FieldName').value.Description;
web.siteUsers.getByEmail(userEmail).get().then(function(properties){
alert(properties.Id)
});
If you want to know the Id of the user who created the item, you can get it like this: