t;My Field&quot;, { Group: &quot;My Group&quot; });
// create a new location field called 'My Field' in list 'My List'
const field2 = await sp.web.lists.getByTitle(&quot;My List&quot;).fields.addLocation(&quot;My Field&quot;, { Group: &quot;My Group&quot; });

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

// log the field Id to console
console.log(r.Id);
</code></pre>
<h3 id="delete-a-field">Delete a Field<a class="headerlink" hr