Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!
Please check out the Docs to see if your question is already addressed there. This will help us ensure our documentation covers the most frequent questions.
Please specify what version of the library you are using: [ import { sp, FieldUserSelectionMode } from "@pnp/sp" ]
Please specify what version(s) of SharePoint you are targeting: [ SharePoint Online ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
Ability to use parameter SelectionGroup when creating a person and group column in a list.
Properties to modify "Allow multiple selections" cannot be set via the sp.web.list addUser command.
Revised the section in npn types.ts, the parameter is not present to use.
Reference: https://github.com/pnp/pnpjs/blob/dev/packages/sp/src/types.ts
export interface FieldCreationProperties extends TypedHash
DefaultFormula?: string;
Description?: string;
EnforceUniqueValues?: boolean;
FieldTypeKind?: number;
Group?: string;
Hidden?: boolean;
Indexed?: boolean;
Required?: boolean;
Title?: string;
ValidationFormula?: string;
ValidationMessage?: string;
}
If you are reporting an issue please describe the expected behavior. If you are suggesting an enhancement please
describe thoroughly the enhancement, how it can be achieved, and expected benefit. If you are asking a question, ask away!
If you are reporting an issue please describe the behavior you expected to occur when performing the action. If you are making a
suggestion or asking a question delete this section.
Thank you for your feedback!
You can already do this. The interface extends TypedHash so you can add any props you need:
await sp.web.lists.getByTitle("ChoiceFieldList").fields.addUser("something", FieldUserSelectionMode.PeopleAndGroups, {
AllowMultipleValues: true,
Required: true,
});
Most helpful comment
You can already do this. The interface extends TypedHash so you can add any props you need: