cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Super User
Super User

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"

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 !

15 REPLIES 15
Gorilla_8
Super User
Super User

@yashag2255 

 

Yes, I tried...

Gorilla_8
Super User
Super User

@yashag2255 

 

Here the solution on the case number one:

 

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

 

Now I will  work on case two

@Gorilla_8 

 

Let's try another expression:

 

If(Lower(radioFilho_1.Selected.Value) = Lower("há previsão orçamentária na área solcitante"), If(IsBlank(DataCardValue163_6.Text) || DataCardValue163_6.Text = "0" ; DisplayMode.Disabled;DisplayMode.Edit),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 

 

Can you please share more details about the case two?

 

 

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
Super User
Super User

@yashag2255 

 

I have to add this code:

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

 

With this code:

DataCardValue1_3.Selected.Email = DataCardValue2_3.Selected.Email

@Gorilla_8 

 

If this needs to be added with an OR condition, then you can update the expression as:

 

 

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

 

 

If this needs to be added as AND condition

If(
    And(IsBlank(DataCardValue163_6.Text) && radioFilho_1.Selected.Value = "há previsão orçamentária na área solicitante" || Value(DataCardValue163_6.Text) = 0 && radioFilho_1.Selected.Value = "há previsão orçamentária na área solicitante"; DataCardValue1_3.Selected.Email = DataCardValue2_3.Selected.Email);
    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!

 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,388)