Data Table PeoplePicker

Dear Plumsail Team,

I need to add an unknown number of Users to a table. Thereby, the varified Email of the users and their job role from the user catalogue should be displayed.

Is it possible to integrate a people picker in a DataTable?

as an alternative, is it possible to fill the table using an individual people picker field and an add button?

Thanks in advance,
Marcel

1 Like

Hello @MarcelD,

The DataTable has no people picker field.

Instead, you can use a 'List or Library' control that binds the list to the parent element. Please see the example and setup instruction here:
https://plumsail.com/docs/forms-sp/how-to/child-parent-form.html

Also, please see 'Populate fields with profile information' article to know how to get the Job Title of the user.

Hello @mnikitina,

thanks for your solution. Unfortunately, this user list should be generically created within the form including the delete function. So, I guess, working via a second lookup-list would not provide this functionality.

Filling a data table step-by-step with the use of a people picker field that populates the table is not realizable?

Is an integration of a people picker field into a data table to be expected? There are already several use cases for such a functionality.

Thanks for your support.

Best regards,
Marcel

Hi MareID,
Please try as below. Hopefully it will help you.

  1. Add People picker control
  2. Add a button beside that
  3. Add a datatable below that
  4. Button onclick function:
    // add new record to the DataTable using columns' InternalNames:
    var user = fd.field('user').value //get user details
    var record = {User :user.DisplayText ,
    Email : user.EntityData.Email,
    Role : user.EntityData.Title
    };
    fd.control('DataTable1').value.push(record); //create new record
    fd.field('user').value = null; // clear people picker
  5. Remove datatable's toolbar by adding the following in CSS (Hide Add new record button)
    .k-grid-toolbar
    {
    display:none!important;
    }

Thanks.

@MarcelD,

'List or Library' supports People Picker field and other types of fields, so adding over column types in 'DataTable' control is not planned.

You can add/edit/delete records in the 'List or Library' the same way you did in 'DataTable' control. Also 'List or Library' supports inline editing.
image

The main difference is that the data is stored in a separate list, not in the item's field. The plus is that it is easily managed, comparing to DataTable.

Give it a try and let us know if you need help with the setup.

Or you can try the solution provided by @annesha_adhikari

@annesha_adhikari,
Thank you for sharing! :handshake:

Hello @mnikitina,

the solution above works perfectly. Thank you for your great support.
Marcel

1 Like