ields.createFieldAsXml(fieldSchema);
// create the new field in the list 'My List'
const field2: IFieldAddResult = await sp.web.lists.getByTitle(&quot;My List&quot;).fields.createFieldAsXml(fieldSchema);

// we can use this 'field' variable to run more queries on the list:
const r = await field.field.select(&quot;Id&quot;)();

// log the field Id to console
console.log(r.Id);
</code></pre>
<h3 id="add-a-new-field">Add a New Field<a class="headerlink" href="#add-a-new-field" title="Permanent link">&para;</a>