public async Task <IField> AddUserMultiAsync(string title, FieldUserOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } return(await AddFieldAsync(FieldUserMultiOptionsToCreation(title, options)).ConfigureAwait(false)); }
private static FieldCreationOptions FieldUserOptionsToCreation(string title, FieldUserOptions options) { FieldCreationOptions creationOptions = new FieldCreationOptions(FieldType.User); creationOptions.ImportFromCommonFieldOptions(title, options); creationOptions.SetAttribute("UserSelectionMode", ((int)options.SelectionMode).ToString()); creationOptions.SetAttribute("UserSelectionScope", "0"); //creationOptions.SetAttribute("IsModern", "TRUE"); //creationOptions.SetAttribute("Dropdown", "TRUE"); return(creationOptions); }
private static FieldCreationOptions FieldUserMultiOptionsToCreation(string title, FieldUserOptions options) { var creationOptions = FieldUserOptionsToCreation(title, options); creationOptions.FieldType = "UserMulti"; creationOptions.SetAttribute("Mult", "TRUE"); return(creationOptions); }
public IField AddUserMulti(string title, FieldUserOptions options) { return(AddUserMultiAsync(title, options).GetAwaiter().GetResult()); }
public IField AddUserBatch(Batch batch, string title, FieldUserOptions options) { return(AddUserBatchAsync(batch, title, options).GetAwaiter().GetResult()); }
public async Task <IField> AddUserMultiBatchAsync(string title, FieldUserOptions options) { return(await AddUserMultiBatchAsync(PnPContext.CurrentBatch, title, options).ConfigureAwait(false)); }