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 / need help.. how to aut...
Power Apps
Answered

need help.. how to auto set to 0 for two value in dropdown and grey out the box???

(0) ShareShare
ReportReport
Posted on by 1,994

HI

 

Can anyone advise

 

how to when select either A or B to set Card 2 to 0 and grey out card 1 and 2?

 

Do I put on visble for card 1 and 2 as If(DataCardValue1.Selected.Value = "A" && "B", 0 ) ???

 

1.PNG

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @bbsin,

    Could you please tell me that what do you mean by grey out card 1 and 2, disable the card to restrict input or make them invisible?

    I am confused that you want to assign the "0" to the card2 and make it invisible at the same time which makes no sense, so please provide more details

    If you want to make both of the cards invisible based on the Dropdown selected, please try as below.

    Set the Visible property of the card 1 and card 2 as below:

    If(Dropdown4.Selected.Value="A" ||Dropdown4.Selected.Value="B",false,true)

    Note that you should use the operator ||(Or) rather than the &&(And).

    If you want to assign the "0" to the card 2 and just make them disabled to input, please try as below.

    1). Set the Default property of the Textinput control within the card 2 as below:

    If(Dropdown4.Selected.Value="A" ||Dropdown4.Selected.Value="B","0",ThisItem.Code)

    2). Set the DisplayMode property of the card 1 and card 2 as below:

    If(Dropdown4.Selected.Value="A" ||Dropdown4.Selected.Value="B",Disabled,Edit)

    Check if this could help you.

    Regards,

    Qi

  • bbsin Profile Picture
    1,994 on at

    @v-qiaqi-msft 


    Yes this is what I need thanks 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard