Remove obsolete choices


What is the best way to check and cleanup choices in a multple lookup field? We have a form where the items of the soucre list can be changed (ex. status). On save the selected choices must be checked and removed if the status is no longer 'Open'.

Thank you!


Dear @danieljr,
This will be quite tricky, as it would require an async check for each item. You can get an array of selected items, perform pnpjs request for a batch, and if status is not 'Open' - filter out these values.

1 Like