Hello Experts!
I have a PowerApps that is linked to a SharePoint list. In the SP list I have a Person field which populate the name of the employees in my company. Since this is not a mandatory field, the user will be able to remove the person's name selected and leave this field in blank, however, I have not been able to achieve this.
Currently I have not been able to clear out the value stored in the People field. After selecting save in the PowerApp, the field is repopulated.
I will really appreciate any support 🙂
Thank you!
Solved! Go to Solution.
Hi,
Have you tried this solution from @joshnystrom?
Note that it only seems to be working if the Person-field is set to "allow multiple values".
Hey @SimonPiquer, thanks for calling @vsolanon's attention to that post.
Unfortunately, you are correct, this approach depends on the "person" field being configured to allow multiple selections. In this other thread - https://powerusers.microsoft.com/t5/Building-Power-Apps/Clearing-out-people-picker-field/m-p/258564#... - I had tested and clarified that Date and single-Person fields were still reliant on the use of the "Formula-level error management" experimental feature, at least at that time.
To be clear @vsolanon, if you enable the "Formula-level error management" experimental feature in your app's Advanced settings, save, close and relaunch editing, you should be able to clear a single-selection people field.
And, as I mentioned in that thread, your update may need to happen by way of a Patch statement rather than using SubmitForm(). More details about how are present in the referenced threads.
Good luck!
Josh
Hi,
Have you tried this solution from @joshnystrom?
Note that it only seems to be working if the Person-field is set to "allow multiple values".
Hey @SimonPiquer, thanks for calling @vsolanon's attention to that post.
Unfortunately, you are correct, this approach depends on the "person" field being configured to allow multiple selections. In this other thread - https://powerusers.microsoft.com/t5/Building-Power-Apps/Clearing-out-people-picker-field/m-p/258564#... - I had tested and clarified that Date and single-Person fields were still reliant on the use of the "Formula-level error management" experimental feature, at least at that time.
To be clear @vsolanon, if you enable the "Formula-level error management" experimental feature in your app's Advanced settings, save, close and relaunch editing, you should be able to clear a single-selection people field.
And, as I mentioned in that thread, your update may need to happen by way of a Patch statement rather than using SubmitForm(). More details about how are present in the referenced threads.
Good luck!
Josh
Hi @joshnystrom @SimonPiquer Thank you very much for the information, it works like a charm 🙂
Hi @joshnystrom and @SimonPiquer .
I have a similar need that is not working. I need to patch a SharePoint single-selection person field to blank.
Below is the portion of the patch that I had hoped would set the field to blank.
I have turned on "Formula-level error management" (and closed and re-opened).
Any advice please?
'Director name':
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Blank(),
Department:Blank(),
DisplayName:Blank(),
Email:Blank(),
JobTitle:Blank(),
Picture:Blank()
},
Thanks,
Carla
To add to my query, I have also tried setting a blankperson variable, then patching that variable into the person field as shown below. Also no luck.
Set(
varBlankPerson,
{
Claims: Blank(),
Department: Blank(),
DisplayName: Blank(),
Email: Blank(),
JobTitle: Blank(),
Picture: Blank()
}
);
Then,
Patch(
'Business plan log',
varRecord,
{
'Director name': varBlankPerson
}
)
Hi Carla @Anonymous,
Sorry for not responding to your request on this thread. Just wondering if you're still facing this challenge and whether you can provide any additional information, as I can try to assist now.
Thank you,
Josh
Create a flag to achieve it.
Step 1: OnStart of the app create Set(ResetFlag,false);
Step 2: In textbox (which is connected to office 365 users with multiple user), Reset property: false(default) - change it to ResetFlag
Step 3: On your button click (Submit button) - Onselect property: - UpdateContext({ResetFlag: !ResetFlag})
I tried all of the solutions in this thread for a single-user field and none worked. What DID work was:
If(
!IsBlank(DataCardValue7.Selected),
DataCardValue7.Selected,
Blank()
)
Where DataCardValue7 is your single-person people picker.
and what about single value people picker field? i also have issues, cannot clear it... after submitting the form the value still stays the same.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
190 | |
95 | |
62 | |
59 | |
58 |
User | Count |
---|---|
251 | |
164 | |
93 | |
79 | |
70 |