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 Apps / Reset a ComboBox peopl...
Power Apps
Unanswered

Reset a ComboBox people picker to blank

(0) ShareShare
ReportReport
Posted on by

@RandyHayes 

 

Hello Randy,

 

No need to respond immediately since it is the weekend, but I recently got a request to set a Mechanical Engineer combobox control back to blank default status after the control has already been used to select a name. The combobox has no problem updating if I choose a different name, but if I just erase my name by clicking the X, it just reverts back to my name when I resubmit the form. I've tried a bunch of different things (see attachment for details) and nothing is working. I was wondering if you could help me out.

 

Thanks,

Teresa

Categories:
I have the same question (0)
  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    I was having same problem few days ago. Below code on the 'Update' Property of The 'Data card' solved my issue:

    If(IsBlank(DataCardValue26.Selected),Blank(),DataCardValue26.Selected)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @tagustin2020 

    Turn on the Error-Level Formula Management option in your Advanced settings in the app.

     

    Also, as a general principal, your Submit action button should only contain the SubmitForm function.

    Everything else you want to occur after the form is submitted should be in the OnSuccess or OnFailure action of the form.

     

    So, the OnSelect action of the button should be:

    Set(varPlaySpinner, true);
    SubmitForm(frmDesigner);
    SubmitForm(frmApproval);
    

     

    The OnSuccess action of the frmApproval should be:

    Set(varRecord,frmApproval.LastSubmit);
    ViewForm(frmApproval);
    UpdateContext({DesignerForm: false, ApprovalForm: false });
    Set(varPlaySpinner, false)

     

    This does not account for the success or failure of the Designer form, but I am not completely clear on the double form submit and the relation to each other.

     

    Hope that helps some.

  • tagustin2020 Profile Picture
    on at

    @RandyHayes 

    @zmansuri 

     

    Hello Z and Randy,

     

    Thank you for you advice. I entered the formulas, but unfortunately, the name is still stubbornly hanging on. Can you spot what I am doing wrong?

     

    MEAssignedTree.png

    Default.Update.png

     

    Save icon OnSelect:

    Set(varPlaySpinner, true);SubmitForm(frmDesigner);SubmitForm(frmApproval)

     

    Form OnSuccess:

    Set(varRecord,frmApproval.LastSubmit);ViewForm(frmApproval);
    UpdateContext({DesignerForm: false});UpdateContext({ApprovalForm: false});
    Set(varPlaySpinner, false)

     

    Thank you,

    Teresa

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @tagustin2020 

    Can you clarify what is being submitted to the list?  Is a Blank or the original value being submitted?

     

  • tagustin2020 Profile Picture
    on at

    @RandyHayes 

     

    Hi Randy,

     

    It is the original value being submitted. If I assign myself to the job, I can assign someone different to the job, but I can't make it go back to blank, it just reverts to my name.

     

    Teresa

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @tagustin2020 

    Change the Update property to be just Blank()  then submit a form and see if you are getting Blank in the record properly.

  • tagustin2020 Profile Picture
    on at

    @RandyHayes 

     

    Hi Randy,

     

    I tried changing the Update property of the ME Assigned data card to Blank(), I deleted my name from the combobox, saved the form - it still reverted back to my name. Stubborn little bugger. I'm going to be in a meeting from 1-4pm PST so please forgive any delays in response this afternoon.

     

    Kind regards,

    Teresa

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @tagustin2020 

    Yes, changing the Update Property of the datacard was all that was needed.  Nothing else would function at that point.  It was a test just to see if the Blank is being written.

    So, are you SURE that the Formula-Level Error Management is on???  That is the only feature that will allow you to write a blank to the datasource.  The signs scream that it is not on.

  • tagustin2020 Profile Picture
    on at

    @RandyHayes 

    @zmansuri 

     

    Hi Randy,

     

    Sorry I missed that instruction on your post. Once I turned on formula-level error management, the Update formula Z provided worked perfectly. I really appreciate the input from both of you!

     

    Teresa

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @tagustin2020 

    Yes, the key to writing a blank to the datasource is to have error-level formula management on. 

    And, your Update property does not need to be all of the If statement, it can simply be valMEAssigned.Selected

    If no selection is made, then .Selected will be blank.  So there is no need to check for blank in order to write a blank.  It just didn't work before because you didn't have that setting on.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard