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 / How to put a "disabled...
Power Apps
Answered

How to put a "disabled" button if two fields have the same user selected and an option button is selected an exact option and one field is blank or with the value "0"

(0) ShareShare
ReportReport
Posted on by

I have a radio field where the user can select two options:

 

"without estimate"
or
"there is budget forecast in the requesting area"

 

What I need is:

 

When the user selects on the radio: "there is a budget forecast in the requesting area" and the value field is blank or with a value equal to "0" (zero), the button has the property "Disabled", if the user selects " without estimate " the button has the" Edit "property.

 

I tried this code:

 

 

If(IsBlank(DataCardValue163_6.Text)=radioFilho_1.Selected.Value="há previsão orçamentária na área solcitante";DisplayMode.Disabled;DisplayMode.Edit)||If(Value(DataCardValue163_6.Text)=0&&radioFilho_1.Selected.Value="há previsão orçamentária na área solcitante";DisplayMode.Disabled;DisplayMode.Edit)

 

 

 

That would be the first case above ...

 

---------------------------------------------------------------------------------------------------------------

In the second case, thanks to the help of , he was able to select the user comparison problem in two fields, well, in this second case...

 

I need you to compare the case above together with the case comparison of two equal users in field, that is, the same, logic ...

 

And I appreciate the help @yashag2255 !

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Gorilla_8 

     

    Can you try to update the expression as:

    If(radioFilho_1.Selected.Value="há previsão orçamentária na área solcitante" && Or(IsBlank(DataCardValue163_6.Text);Value(DataCardValue163_6.Text) = 0);DisplayMode.Disabled;DisplayMode.Edit)

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Gorilla_8 Profile Picture
    on at

    Hi @yashag2255 

    Keep the property of "Edit"

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Gorilla_8 

     

    In which case, is it failing? If you can share more details, I will be able to help you better.

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Gorilla_8 Profile Picture
    on at

    @yashag2255 

     

     

    Here you see your code:

     

    properties.png

     

     

    And here the field is enabled for editing when it was not supposed to be:

     

    edit button.png

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Gorilla_8 

     

    Can you please verify if the text that you want to match is proper in the expression? 

     

    Can you also try to update the expression to:

     

    If(radioFilho_1.Selected.Value="há previsão orçamentária na área solcitante", If(IsBlank(DataCardValue163_6.Text) || Value(DataCardValue163_6.Text) = 0 ; DisplayMode.Disabled;DisplayMode.Edit),DisplayMode.Edit)

     

    If this doesnot work, can you do a test and place three labels on the screen, add text properties as:

    Label 1 -> radioFilho_1.Selected.Value="há previsão orçamentária na área solcitante"

    Label 2 -> IsBlank(DataCardValue163_6.Text)

    Label 3 -> Value(DataCardValue163_6.Text) = 0

    Please send me a screenshot of the output of these three labels.

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Gorilla_8 Profile Picture
    on at

    label1.pnglabel2.pnglabel3.png

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Gorilla_8 

     

    All the results are returned as false. 2nd is expected but 1st and 3rd should be true as per your configuration. Can you please change the text in Label 1 and Label3 to below expressions and check if it is returning the correct value.

    Label 1 -> radioFilho_1.Selected.Value             (I am guessing there is a spelling mistake)

    Label 3 ->  Value(DataCardValue163_6.Text)

     

    One other thing, if your app is open for a long time, can you please save and close the app, and open it again?

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Gorilla_8 Profile Picture
    on at

    @yashag2255 

     

    I see...

     

    I don't know why...but:


    label3.pnglabrl3.png

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Gorilla_8 

     

    This is strange. Have you tried closing the app?

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Gorilla_8 Profile Picture
    on at

    @yashag2255 

     

    Yes, I tried...

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard