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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

reset combobox based on toggle

(0) ShareShare
ReportReport
Posted on by 148

trying to reset a combobox (datacardvalue9) based on a toggle - using sharepoint list as datasource

 

the onchange on the toggle is :

If(Self.Value = false,
Reset(DataCardValue9)
)

 

this does nothing to the value of combobox.

 

what i want to achieve is if toggle is off (false) then the value in the combo would be cleared/null.

any ideas what else i need to do?

 

Categories:
I have the same question (0)
  • EdViegas Profile Picture
    436 on at
    Re: reset combobox based on toggle

    Maybe is better to use a button instead of a toggle. In your combobox, set parameter Reset to a boolean variable, for example: VarFieldReset and leave empty the Default parameter. Then, set the paramente OnSelect for your button like:

     

    UpdateContext({VarFieldReset: !VarFieldReset});
    UpdateContext({VarFieldReset: !VarFieldReset})

     

  • cheezy Profile Picture
    148 on at
    Re: reset combobox based on toggle

    anyway of doing via a toggle? toggle linked to a flow which i would rather not change

  • Verified answer
    v-yujincui-msft Profile Picture
    on at
    Re: reset combobox based on toggle

    Hi @cheezy ,

     

    Maybe you could try to select the Combo Box Control(DataCardValue9) and apply the following formula on its DefaultSelectedItems property as:

    If(Form1.Mode=FormMode.Edit&&Toggle1.Value=true,Parent.Default,[])

    vyujincuimsft_1-1657875453407.png

    vyujincuimsft_0-1657875443613.png

     

     

    Best Regards,
    Charlie Choi

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

Coming soon: forum hierarchy changes

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 803 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 314 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 253 Super User 2025 Season 2

Last 30 days Overall leaderboard