Select all values in lookup

Good day,
i have a multiple lookup field.
How can i by clicking checkbox "select all" - to select all values in lookup field?

Dear @ixxxl,
You could add a button with pnpjs code to retrieve all items, then create an array with all item IDs and populate the Lookup field with it.

How to retrieve all items you can check here - How To: Query List on Different SharePoint - #5 by mnikitina

How to work with pnpjs for filtering and such, check here - List Items - PnP/PnPjs

How to populate Multilookup field, here - Managing SharePoint fields with JS — SharePoint forms

i tried as is in manual, but have some problems - values are populated but undefined

Cod in button:


Dear @ixxxl,
Yes, the extra values are not available if you set the value with code. You can only retrieve these with pnpjs, as shown in the links above.

1 Like