Hi,
I have button where I need to add condition on Display Mode.
I have 2 dropdown in there I have different values-
1st Dropdown 2nd Dropdown Button
Not Received | Blank | Enabled |
Partially Received | Dynamically select value | Enabled |
Partially Received | Blank | Disabled |
Please understand condition and give me suggestion.
Thanks in advance!
@iAM_BA ,
The issue here is that there are other combinations (2 x 4 = 8 and you have listed 5) - what you need to do is define what is disabled and everything else is enabled, or the reverse. so going by your Table - Enabled
If(
(
Dropdown1.Selected.Value = "Not Received" &&
Len(Dropdown2.Selected.Value) = 0
) ||
(
Dropdown1.Selected.Value = "Partially Received" &&
Dropdown2.Selected.Value = "CMA"
),
DisplayMode.Edit,
DisplayMode.Disabled
)
or Disabled
If(
Dropdown1.Selected.Value = "Partially Received" &&
(
Dropdown2.Selected.Value = "DMA" ||
Dropdown2.Selected.Value = "AMA" ||
Len(Dropdown2.Selected.Value) = 0
),
DisplayMode.Disabled,
DisplayMode.Edit
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi @WarrenBelz
I am giving in simple table -
1st Dropdown 2nd Dropdown Button
Not Received | Blank | Enabled |
Partially Received | Dynamically select value - CMA | Enabled |
Partially Received | Dynamic selected Value - DMA | Disabled |
Partially Received | Dynamic selected Value - AMA | Disabled |
Partially Received | Blank | Disabled |
1st scenario-
When in second row if I am selecting value as CMA then it should be enabled and in next rows value needs to be select as "CMA" only. Not any other value.
2nd Scenario-
And in this scenario if in row selected "Partially received" and dropdown value is selected as "DMA" then button enabled and in second row if you are selecting "Partially received" and "CMA" then button should be disabled.
Means when user select any value in second dropdown then that should be uniform for each row.
If you understand it please let me know.
Thanks.
Hi @iAM_BA ,
So under what conditions do you need to control disabled ? This should be really simple, but I am getting more unclear the further we go here - can you please list in simple terms what conditions need to exist to disable the button.
HI @WarrenBelz
In Dropdown2 value is dynamic. User can select any one value which is in dropdown. And in next row user need to select value which selected in 1st row.
Thanks!
@iAM_BA ,
Something like this should do what you need
If(
Len(Dropdown2.Selected.Value) = 0 ||
(
Dropdown1.Selected.Value = "Partially Received" &&
Dropdown2.Selected.Value = "cma.test"
),
DisplayMode.Edit,
DisplayMode.Disabled,
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi @WarrenBelz
The scenario is like
In 1st case - Save button will enabled
In 2nd case - Save button will enabled
3rd case - There is under data requested from dropdown there is some another value I select then button should be disabled and when I select "cma.test" value then Save button will enabled.
If you need more clarity let me know.
Thanks.
@iAM_BA ,
Can you please tell me exactly what you want here - under what circumstances do you want the control disabled ? I have no idea what you mean in your last post.
Hi @WarrenBelz
But in second dropdown there is not static value. User can select any one value on that basis in new row second dropdown value should be same, which is previous.
Thanks !
@iAM_BA ,
Assuming you mean the value selected is "DMA"
If(
Dropdown1.Selected.Value = "Partially Received" &&
Len(Dropdown2.Selected.Value) = 0 || Dropdown2.Selected.Value = "DMA"
DisplayMode.Disabled,
DiaplayMode.Edit
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
HI @WarrenBelz ,
Thanks for the reply.
Actually there is change in this scenario.
As once I have selected 2nd dropdown value that should be locked for next row also.
Like I have shown below-
1st Dropdown 2nd Dropdown Button
Not Received | Blank | Enabled |
Partially Received | Dynamically select value - CMA | Enabled |
Partially Received | Dynamic selected Value - CMA | Enabled |
Partially Received | Dynamic selected Value -DMA | Disabled |
All these dropdown are added in the Gallery. And each time I am adding new entry by using Add new button.
Thanks.