ot;, { MaxLength: 255, Group: &quot;My Group&quot; });
// create a new text field called 'My Field' in the list 'My List'.
const field2: IFieldAddResult = await sp.web.lists.getByTitle(&quot;My List&quot;).fields.addText(&quot;My Field&quot;, { MaxLength: 255, 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="add-a-calculated-fiel