I have an "On/Off" field (default is Off). I have a text field, which is Hidden when my On/Off is Off. When it is On, the text field is visible and mandatory.
However when I try to submit form, with On/Off being Off, the form returns error saying required field not filled.
I cannot see the required text field, because the visible property condition of the text field is working as intended.
When I turn it On the text field becomes visible and it is highlighted in red as required.
Now why would that happen?
The text fields required and visible properties are both "DataCardValue2.Value = true". So the condtitions for making the field visible and mandatory are the same, but the field is hidden and required...
It is as if the text field's required property is evaluating DataCardValue2.Value as true while the same fields visible property is evaluating DataCardValue2.Value as false.
The text field is NOT set as mandatory on the SharePoint List. I thought that might be it, but then I checked...
ATTEMPT: I have tried to set the text fields required property to
"Bestilling_Navn_DataCard1.Visible = true"
Bestilling_Navn_DataCard1 is itself. It was required, even when it was Hidden. I am officially confused :-)
EDIT: Formatting
Yes/No columns integrated with Power Apps is apparently always problematic because of a bug which Microsoft aren't fixing... So it's not that mine or other suggested solutions are wrong it's just that power apps has an unfixed bug. Please check Reza's post for more details.
https://rezadorrani.com/index.php/2019/04/14/powerapps-filter-sharepoint-yes-no-column-bug/