Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Dropdown Selection based on the Toggle value.

(0) ShareShare
ReportReport
Posted on by

HI Everyone,

 

 I have a toggle in my PowerApps. 

Danny_Dicaprio_0-1708955150257.png

I have a dropdown with Items Choices([@Top_Risk_Controls].Controltype)

 

Based on my toggle selection I want to display me dropdown list 

like if toggle is selected (Yes) I want the drop-down should be selected as Compensatory 

Danny_Dicaprio_1-1708955403563.png

 

If it is not checked (No) I want to display all of the dropdown values in that dropdown 

 

I tried to change the items property and Dsi as below but it didn't worked

If(DataCardValue98.Value,({Value: "Compensatory"}), 
Choices([@Top_Risk_Controls].Controltype)
)

 

Could anyone please let me know how will I do it

  • Verified answer
    v-mengmli-msft Profile Picture
    on at
    Re: Dropdown Selection based on the Toggle value.

    Hi @Danny_Dicaprio ,

     

    Sorry for misunderstanding your requirement.

    The formula also works for Items property.

    Please try it on items of dropdown:

    If(DataCardValue98.Value,[{Value:"Compensatory"}], 
    Choices([@Top_Risk_Controls].Controltype)
    )

    You can also modify your formula to:

    If(DataCardValue98.Value,Table({Value:"Compensatory"}), 
    Choices([@Top_Risk_Controls].Controltype)
    )

     

     

    Best regards,

    Rimmon

  • Danny_Dicaprio Profile Picture
    on at
    Re: Dropdown Selection based on the Toggle value.

    Thanks for the response 

    I wasn't looking for a multiple selection drop-down

    So, basically i want the drop-down should be updated automatically with value " Compensatory" if the toogle is checked

    If it is not checked I want drop down to work normally as displaying all the choices in the items

  • v-mengmli-msft Profile Picture
    on at
    Re: Dropdown Selection based on the Toggle value.

    Hi @Danny_Dicaprio ,

     

    Dropdown doesn't support multiple selections, I recommend you try combo box.

    Please try this:

    1.Turn on "allow multiple selections".

    vmengmlimsft_0-1708957259935.png

     

    2.Items of combo box:

    Choices([@Top_Risk_Controls].Controltype

    3.DefaultSelectedItems of combo box:

    If(DataCardValue98.Value,[{Value:"Compensatory"}], 
    Choices([@Top_Risk_Controls].Controltype)
    )

     

     

     

    Best regards,

    Rimmon

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard