Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: PeoplePicker.SelectedPeople JSON parsing error #309

Closed
Havgo opened this issue Mar 22, 2023 · 5 comments
Closed

[BUG]: PeoplePicker.SelectedPeople JSON parsing error #309

Havgo opened this issue Mar 22, 2023 · 5 comments
Assignees
Labels
bug Something isn't working Component: PeoplePicker documentation Improvements or additions to documentation 👋 needs author feedback Waiting on a response from the author

Comments

@Havgo
Copy link

Havgo commented Mar 22, 2023

When a PeoplePicker component is blank (on app start, or after clearing selection), any reference to it (PeoplePicker.SelectedPeople) returns an error "JSON Parsing Error, Expected 'Array' But Got 'Undefined'"

Unlike selecting an empty collection, which would Display "We didn't find any data", Selecting PeoplePicker.SelectedPeople displays "Error".

For reference:

Suggestions_Items:
TBcolMeetingPeopletemp

OnSearch:
ClearCollect(
TBcolMeetingPeopletemp,
Search(
Filter(colHRdata_EmployeeRegistry,!IsBlank(WorkEmail)),Self.SearchText,"FullName")
)

Gallery with Items:
PeoplePicker.SelectedPeople

Returns the error in the screenshot

Screenshot 2023-03-22 165309

@Havgo Havgo added bug Something isn't working ⚠️ needs triage Has not been triaged by the team yet. labels Mar 22, 2023
@dineshary
Copy link

I am facing the same error. Is there a workaround for this issue?

@WinOnMarco
Copy link

Same here. Any ideas?

@denise-msft
Copy link
Member

Please try branching to a blank value instead of the PeoplePicker property if there is a blank or error state using following formula in the Items property of the gallery or referring component:
If(!IsBlankOrError(DataCardValue6_1.SelectedPeople),DataCardValue6_1.SelectedPeople, Blank())

@denise-msft denise-msft self-assigned this Jul 12, 2023
@denise-msft denise-msft added 👋 needs author feedback Waiting on a response from the author Component: PeoplePicker and removed ⚠️ needs triage Has not been triaged by the team yet. labels Jul 12, 2023
@denise-msft
Copy link
Member

@Havgo @WinOnMarco @dineshary please let me know whether the workaround works for you. Thank You.

@denise-msft denise-msft added this to the Creator Kit - July 2023 milestone Jul 19, 2023
@denise-msft denise-msft added the documentation Improvements or additions to documentation label Jul 26, 2023
@denise-msft
Copy link
Member

Closing due to inactivity, please see if the provided answer works.

@microsoft microsoft locked and limited conversation to collaborators Aug 1, 2023
@denise-msft denise-msft converted this issue into discussion #376 Aug 1, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working Component: PeoplePicker documentation Improvements or additions to documentation 👋 needs author feedback Waiting on a response from the author
Projects
None yet
Development

No branches or pull requests

4 participants