cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
masesa
Level: Power Up

People picker breaks when clearing DefaultSelectedItems

Hello

 

I currently have the following scenario:

 

A toggle-switch toggles a people picker field from disabled to active. The DefaultSelectedItems field of the people picker is set to the variable  "myself" which is initially set to the current user. Now I want to clear this DefaultSelectedItems with the "OnCheck" property of the toggle-switch but this breaks the people picker so it won't search anymore. Any suggestions?

 

Below is the code for my different actions.

Initialization:
UpdateContext(
    { 
        myself: {
            DisplayName: User().FullName;
            Claims: "i:0#.f|membership|" & Lower(User().Email)
        }
    }
)

OnCheck:
UpdateContext(
    { 
        myself: { }
    }
)

OnUncheck:
UpdateContext(
    { 
        myself: {
            DisplayName: User().FullName;
            Claims: "i:0#.f|membership|" & Lower(User().Email)
        }
    }
) 

Cheers masesa

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: People picker breaks when clearing DefaultSelectedItems

Hi @masesa 

 

I test on my side with your formula expression, and it works ok.

So could you please try to refresh your current browser or test with other browsers?

Could you  please try to change";" to "," to test again?

Initialization:
UpdateContext(
    { 
        myself: {
            DisplayName: User().FullName,
            Claims: "i:0#.f|membership|" & Lower(User().Email)
        }
    }
)

OnCheck:
UpdateContext(
    { 
        myself: { }
    }
)

OnUncheck:
UpdateContext(
    { 
        myself: {
            DisplayName: User().FullName,
            Claims: "i:0#.f|membership|" & Lower(User().Email)
        }
    }
) 

 ToggleTest.PNG

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: People picker breaks when clearing DefaultSelectedItems

Hi @masesa 

 

I test on my side with your formula expression, and it works ok.

So could you please try to refresh your current browser or test with other browsers?

Could you  please try to change";" to "," to test again?

Initialization:
UpdateContext(
    { 
        myself: {
            DisplayName: User().FullName,
            Claims: "i:0#.f|membership|" & Lower(User().Email)
        }
    }
)

OnCheck:
UpdateContext(
    { 
        myself: { }
    }
)

OnUncheck:
UpdateContext(
    { 
        myself: {
            DisplayName: User().FullName,
            Claims: "i:0#.f|membership|" & Lower(User().Email)
        }
    }
) 

 ToggleTest.PNG

 

Hope this could be helpful.

 

Best Regards.

Yumia

View solution in original post

TopShelf-MSFT
Level 10

Re: People picker breaks when clearing DefaultSelectedItems

Hi @masesa can you review the above reply and update the thread if it was helpful? 

 

Thank you,

 

@TopShelf-MSFT 

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (5,587)