I am creating a canvas app with Dynamics 365.
One of the fields I am using is an option set in Dynamics. Won, Lost, Wash, vetted Out. This is a dropdown.
I want to set visibility of another field based on the selected value. So in the visible property for the other field I have "If(DataCardValue2.Selected.Value = "Won", true, false)
But I am getting an incompatible type error? I have tried a lot of different ways to write this out but always get this error.
What am I doing wrong?
Thanks,
Terry
Solved! Go to Solution.
Let's say the option set name is OptionSet1.
Try changing it to:
If(DataCardValue2.Selected.Value = OptionSet1.Won, true, false)
The reason it doesn't work with "Won" is because "Won" is a text field. While it is the same text as the value in your dropdown, they are not the same records. The dropdown record is actually a record from the optionset, hence, OptionSet1.Won.
Let me know if this helps.
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.
Thanks!
Hardit Bhatia
https://thepoweraddict.com
Let's say the option set name is OptionSet1.
Try changing it to:
If(DataCardValue2.Selected.Value = OptionSet1.Won, true, false)
The reason it doesn't work with "Won" is because "Won" is a text field. While it is the same text as the value in your dropdown, they are not the same records. The dropdown record is actually a record from the optionset, hence, OptionSet1.Won.
Let me know if this helps.
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.
Thanks!
Hardit Bhatia
https://thepoweraddict.com
Thanks! Worked. Has it always been this way? I haven't done a power app in a while but I dont remember having to do that before?
Thanks,
Terry
User | Count |
---|---|
198 | |
105 | |
89 | |
45 | |
43 |
User | Count |
---|---|
245 | |
105 | |
103 | |
65 | |
60 |