Skip to content

How to clear the (people)picker control when items are added manually #265

Answered by yaseralhosani
rbarten asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rbarten,

The Issues 236 has been raised. This is a temporary solution that I found.

Button.OnSelect
It would be best to replace User() with functions like AddColumns, Filter...etc. Basically, you need to add items to the collection and then set it to blank. You will need 2 Collections if 1 collection is not working,

ClearCollect(
    PreSelectedUserCollection,
    User()
);
ClearCollect(
    PreSelectedUserCollection,
    Blank()
);

Only if you are using PreSelectedUserCollection, set the column name from the collection in PeoplePicker.PersonaKey, PeoplePicker.PersonaName...etc

PeoplePicker.Items
This is only for preselected or leaves blank.

PreSelectedUserCollection

PeoplePicker.On…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by denise-msft
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants