Hello,
I have three controls as follows:
On Submit Button click, I need to verify if any of the value is blank, therefore, I have applied following formula on button click:
If(IsBlank(Dropdown1.Selected.Value)=true,UpdateContext({ValidationConfirm:true}),UpdateContext({ValidationConfirm : false }));
If(IsBlank(Dropdown2.Selected.Value)=true,UpdateContext({ValidationConfirm:true}),UpdateContext({ValidationConfirm : false }));
If(IsBlank(Dropdown3.Selected.Value)=true,UpdateContext({ValidationConfirm:true}),UpdateContext({ValidationConfirm : false }))
Although above is working as expected, I need something as follows:
If any of the dropdown values are blank, "Result 1", "Result 2"
If and Switch condition did not work for me, Also "Or" or "||" operators were not resulting as expected too. Probably I am doing something wrong, but I gave up!
Can you please help me in optimizing this formula further?
Thanks,
Solved! Go to Solution.
@dave8
Here you go... I made a small syntax error. Missing a closing bracket on the last line.
If(
!IsBlank(Dropdown1.Selected.Value)=true,
And !IsBlank(Dropdown2.Selected.Value)=true
And !IsBlank(Dropdown3.Selected.Value)=true,
UpdateContext({ValidationConfirm: true}),
UpdateContext({ValidationConfirm: false})
)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
I think this is the formula you will need to check if all the dropdown inputs have a value.
If(
!IsBlank(Dropdown1.Selected.Value)=true,
And !IsBlank(Dropdown2.Selected.Value)=true
And !IsBlank(Dropdown3.Selected.Value)=true,
UpdateContext({ValidationConfirm: true}),
UpdateContext({ValidationConfirm: false}
)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thank you for your attention, however it still throws an error:
Note: I have removed "," after first condition, as it was not needed in formula.
What could be wrong? I have faced the same error while trying earlier as well with other alternatives!
Thanks!
@dave8
Here you go... I made a small syntax error. Missing a closing bracket on the last line.
If(
!IsBlank(Dropdown1.Selected.Value)=true,
And !IsBlank(Dropdown2.Selected.Value)=true
And !IsBlank(Dropdown3.Selected.Value)=true,
UpdateContext({ValidationConfirm: true}),
UpdateContext({ValidationConfirm: false})
)
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thank you!
Below formula has removed syntax error, however it doesn't execute the Result One!
If(
!IsBlank(Dropdown1.Selected.Value)=true
And !IsBlank(Dropdown2.Selected.Value)=true
And !IsBlank(Dropdown3.Selected.Value)=true,
UpdateContext({ValidationConfirm: true}),
UpdateContext({ValidationConfirm: false})
)
While below formulas does:
If(IsBlank(Dropdown1.Selected.Value)=true,UpdateContext({ValidationConfirm:true}),UpdateContext({ValidationConfirm : false }));
If(IsBlank(Dropdown2.Selected.Value)=true,UpdateContext({ValidationConfirm:true}),UpdateContext({ValidationConfirm : false }));
If(IsBlank(Dropdown3.Selected.Value)=true,UpdateContext({ValidationConfirm:true}),UpdateContext({ValidationConfirm : false }));
I have also faced above behaviour earlier, What could be missing now?
Thanks,
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
203 | |
106 | |
56 | |
51 | |
41 |
User | Count |
---|---|
267 | |
156 | |
83 | |
81 | |
56 |