I am trying to create a custom column in Dataverse to store a boolean value. I'm making a power app which pulls the value from Dataverse to set the position of a toggle (all good so far), then I'd like another control to be able to change the value of the toggle (this is where it breaks). This is the logic I have so far:
PowerApp page:
OnVisible = Set(varBooleanTest, selectedProfile.Selected.'booleanTest')
*Note, "selectedProfile" is a dropdown which is connected to the dataverse table with the boolean value. The column booleanTest is a Yes/No column
toggle_1:
Default = varBooleanTest
Now when I open the page, the toggle is set to the value from the table which is selected in the dropdown - all good so far. I then add another toggle which has overarching control in my context. The functionality I want is when the toggle is switched off, it also turns off the toggles under it, including toggle_1. So, what I've tried is:
toggle_2:
OnUnCheck = set(varBooleanTest,false)
And here is where I get my error:

Now when I back up to the OnVisible formula, I can see that it no longer likes how the data was brought in. It looks like it cant detect the data type as boolean.

More proof to that theory:

So my question is, is there a column type I can use in DV which PowerApps recognizes as boolean? Here is what I've tried with no success:
- Using a yes/no column with the items set to "true" and "false"

- Using a yes/no column with different string values, then assigning them to boolean in PowerApps:
- Data type - Yes/No
- Items - Enabled, Disabled
- In PowerApps OnVisible = Set(varBooleanTest, If(selectedProfile.Selected.booleanTest = 'enabled',true,false));
- This fails as selectedProfile.Selected.booleanTest is not a recognised data type able to be evaluated
- I've tried the same method as above with both "Choice" and "Choices" column types, trying to switch a string value to boolean in PowerApps and get the same error
Hopefully this is possible as it seems like pretty simple functionality to be able to pass a boolean column type to PowerApps!
Thanks in advance for the help.