web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Sending a Blank Value ...
Power Pages
Unanswered

Sending a Blank Value to a Person Field to Sharepoint

(0) ShareShare
ReportReport
Posted on by 26
Hello, 
 
I have two combo box tied to our directory to help the user search for the person and lets them patch it over to a sharepoint list.
 
However - when either field is left blank, I get an error (attached image):
 
 
 
Below is my patch code with cmbAssignee and cmbChamp as the two combo boxes:
 
Patch(
    'PMOProjectIntake',
    Defaults('PMOProjectIntake'),
    {
        Title: txtProjectName.Value,
        Organization: {'Value/Justification': cmbOrg.Selected.Value},
        'Primary Team': {'Value/Justification': cmbPT.Selected.Value},
        'Additional Team': cmbOT.SelectedItems,
        ProjectType: {'Value/Justification': cmbType.Selected.Value},
        Area: {'Value/Justification': drpArea.Selected.Value},
        Description: txtDescription.Value,
        'Value/Justification': txtValue.Value,
        Assignee: {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims:  "i:0#.f|membership|" & cmbAssignee.Selected.UserPrincipalName,
            Department: "",
            DisplayName: cmbAssignee.Selected.DisplayName,
            Email: cmbAssignee.Selected.Mail,
            JobTitle: "",
            Picture: ""
            },
        'BG/OpsChampion': {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims:  "i:0#.f|membership|" & cmbChamp.Selected.UserPrincipalName,
            Department: "",
            DisplayName: cmbChamp.Selected.DisplayName,
            Email: cmbChamp.Selected.Mail,
            JobTitle: "",
            Picture: ""
            }
    },frmAttachment.Updates
);
Concurrent(
Reset(txtProjectName),
Reset(cmbOrg),
Reset(cmbPT),
Reset(drpArea),
Reset(txtDescription),
Reset(txtValue),
Reset(cmbOT),
Reset(cmbAssignee),
Reset(cmbType),
Reset(cmbChamp),
ResetForm(frmAttachment)
);
Notify("Submission Success!",NotificationType.Success)
 
 
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at
    Hi @Rondel,
    You should be able to use
    Assignee: {Blank()}
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
    ​​​​​​
  • Rondel Profile Picture
    26 on at
    Hi @WarrenBelz - thanks for the reply - would it still patch over the name they entered in the event the user decides to not leave the field blank?

    I appreciate the help!
     
  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at
    Hi @Rondel,
    Something like this should do it
    Assignee:
    If(
       IsBlank(cmbAssignee.Selected.UserPrincipalName),
       {Blank()},
       {
          Claims:  "i:0#.f|membership|" & cmbAssignee.Selected.UserPrincipalName,
          Department: "",
          DisplayName: cmbAssignee.Selected.DisplayName,
          Email: cmbAssignee.Selected.Mail,
          JobTitle: "",
          Picture: ""
       }
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • Rondel Profile Picture
    26 on at
    Thank you much @WarrenBelz!
     
    With your help I was able to modify your recommended code to make it patch 'blank' fields:
     
    Assignee:
            If(cmbAssignee.Selected.UserPrincipalName=Blank(),Blank(),
            {
                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                Claims:  "i:0#.f|membership|" & cmbAssignee.Selected.UserPrincipalName,
                Department: "",
                DisplayName: cmbAssignee.Selected.DisplayName,
                Email: cmbAssignee.Selected.Mail,
                JobTitle: "",
                Picture: ""
                }
            )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard