a<a class="headerlink" href="#create-a-field-using-an-xml-schema" title="Permanent link">&para;</a></h3>
<p>Create a new field by defining an XML schema that assigns all the properties for the field.</p>
<pre><code class="language-TypeScript">import { spfi } from &quot;@pnp/sp&quot;;
import { IField, IFieldAddResult } from &quot;@pnp/sp/fields/types&quot;;

import &quot;@pnp/sp/webs&quot;;
import &quot;@pnp/sp/lists&quot;;
import &quot;@pnp/sp/fields&quot;;

const sp = spfi(...);

// define the schema for y