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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Clear a conditional dr...
Power Apps
Answered

Clear a conditional drop down when the user changes the primary drop down. SPO list as a data source

(0) ShareShare
ReportReport
Posted on by 158

Hello all, first let me give a brief description of my form,

  1. I created my app from a SPO list using the "Create an App" option, so I do not have the SharePoint Integration feature in PowerApps designer.
  2. My app has conditionally hidden and conditionally required drop down and fields.

Here is my scenario,

  1. The user changes the primary drop down in edit mode (new or edit mode)
  2. this action hides a conditionally required drop down along with the value selected
  3. this unnecessary value gets submitted

I am able to clear one of the text boxes by setting the default to "",

  1. If(DataCardValue33.Selected.Value = "Choice1" Or DataCardValue33.Selected.Value = "choice4",Parent.Default,"")

however, this does not work on the drop down, I get an error because a record is expected.

 

how do I prevent the drop from storing the selected value when gets hidden and is no longer required because the user changed the primary category, maybe a condition in the OnSubmit to clear the unnecessary values?

Thanks for any help

Categories:
I have the same question (0)
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi@rixmcx59 ,

     

    I have read your question, perhaps you can try changing the Drop Down in this way:

     

    Set the Visible and Required of the Card to:

     

    DataCardValue33.Selected.Value="Choice 1"||DataCardValue33.Selected.Value="Choice 4"

     

    vmengmlimsft_14-1689841750748.png

     

    Then set up the DefaultSelectedItems of the Drop Down to:

     

    If(DataCardValue33.Selected.Value="Choice 1"||DataCardValue33.Selected.Value="Choice 4",Parent.Default,Blank())

     

    vmengmlimsft_15-1689841850507.png

     

    Here are the results of my tests:

     

    When I select Choice 1 or Choice 4 in choices, the choice_2 appears, which displays the original data and is required.

    vmengmlimsft_3-1689837949939.png

     

    vmengmlimsft_4-1689837949940.png

     

    But when I select Choice 2 in choices, the choice_2  will be hidden and the data will be clear.

    vmengmlimsft_5-1689837949942.png

     

    vmengmlimsft_6-1689837949943.png

     

    I hope this will help you.

     

    Best regards, 

    Rimmon Li

  • rixmcx59 Profile Picture
    158 on at

    Thanks, this worked perfectly for me.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard