Im using my Checkboxes to validate data to my CDS.
This already works like a charm but unfortunately you can click both boxes.
But there should be only three options:
* Left box is checked (1:0)
* Right box is checked (0:1)
* Both boxes are unchecked (0:0)
KlappenFunktion: If(
KlappenFunktionIO.Value = true;
KlappenEingestelltIO.Value;
If(
KlappenFunktionNIO.Value = true;
KlappenFunktionNIO.Value;
""
)
);
This is how im Saving my Value.
So there is always a priority: LeftBox > RightBox > Unchecked
My goal is to disable the possibility to check both boxes at the same time.
I only want to use checkbox elements.
Solved! Go to Solution.
Hi,
You need to control the DisplayMode of each Checkbox based on the other's value. For example, I have two checkboxes Checkbox1 and Checkbox2.
DisplayMode of Checkbox1 = If(Checkbox2.Value, DisplayMode.Disabled, DisplayMode.Edit)
DisplayMode of Checkbox2 = If(Checkbox1.Value, DisplayMode.Disabled, DisplayMode.Edit)
It basically checks if the value of the other checkbox is true, if it is, then it disables the checkbox. Please let me know if this works for you.
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!
Hardit(Haman)
Hi,
You need to control the DisplayMode of each Checkbox based on the other's value. For example, I have two checkboxes Checkbox1 and Checkbox2.
DisplayMode of Checkbox1 = If(Checkbox2.Value, DisplayMode.Disabled, DisplayMode.Edit)
DisplayMode of Checkbox2 = If(Checkbox1.Value, DisplayMode.Disabled, DisplayMode.Edit)
It basically checks if the value of the other checkbox is true, if it is, then it disables the checkbox. Please let me know if this works for you.
---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!
Hardit(Haman)
@PowerAddictWhat if you have 10 checkboxes? I tried using your formula
DisplayMode of Checkbox1 = If(Checkbox2.Value, DisplayMode.Disabled, DisplayMode.Edit) & If(Checkbox3.Value, DisplayMode.Disabled, DisplayMode.Edit)
DisplayMode of Checkbox2 = If(Checkbox1.Value, DisplayMode.Disabled, DisplayMode.Edit) & If(Checkbox3.Value, DisplayMode.Disabled, DisplayMode.Edit)
DisplayMode of Checkbox3 = If(Checkbox2.Value, DisplayMode.Disabled, DisplayMode.Edit) & If(Checkbox1.Value, DisplayMode.Disabled, DisplayMode.Edit)
But it doesnt work for me 😞
Actually I just simplified the process..
On the oncheck property of the checkbox I reset the other checkboxes.. like this:
Reset(WirelessOutageCheckbox);Reset(WirelessCheckbox);Reset(ServerMaintCheckbox);Reset(PowerOutageCheckbox);Reset(PowerMaintCheckbox);Reset(NetworkMaintCheckbox);Reset(InternetMaintCheckbox);Reset(InternetOutageCheckbox); Reset(NetworkDeviceOutageCheckbox)
But what to do if I got only one checkbox? The data is taken from the SharePoint list so there is only one checkbox control in the UI. That mean I can't validate its contents based on the other checkboxes.
Can you provide an example?You should still be able to validate based on the checkboxes even if only 1 has data taken from SP list.
Hi Leslie,
as you can see on the UI below each entry is the item taken from the SharePoint list using filtering:
But in the App builder this is a single set of controls i.e. label for the bold code on the left (i.e. 3b2, some other text and the checkbox).
The problem is when app filters lists items it may find more than one (in fact it should because it filtering out all available workstations) however in the app builder I can only edit a single checkbox control so trying to figure out a function for onCheck and onUncheck as well as OnSelect to somehow disable checking more than one box at the same time.
@Traconis
What worked for me was to reset the other checkboxes in the oncheck function. See below example:
I have it so a person can only select 1 check box. By selecting that checkbox it resets all the other checkboxes.
AlloftheAbove
AllCheckbox
OnCheck: Reset(WirelessSysCheckbox);Reset(FileAccessCheckbox);Reset(PhonesCheckbox);Reset(InternetAccessCheckbox);Reset(JDECheckbox)
WirelessSys
WirelessSysCheckbox
OnCheck: Reset(JDECheckbox);Reset(AllCheckbox);Reset(PhonesCheckbox);Reset(InternetAccessCheckbox);Reset(FileAccessCheckbox)
Phones
PhonesCheckbox
OnCheck: Reset(WirelessSysCheckbox);Reset(AllCheckbox);Reset(JDECheckbox);Reset(InternetAccessCheckbox);Reset(FileAccessCheckbox)
JDEAccess
JDECheckbox
OnCheck: Reset(WirelessSysCheckbox);Reset(AllCheckbox);Reset(PhonesCheckbox);Reset(InternetAccessCheckbox);Reset(FileAccessCheckbox)
InternetAccess
InternetAccessCheckbox
OnCheck: Reset(WirelessSysCheckbox);Reset(AllCheckbox);Reset(PhonesCheckbox);Reset(JDECheckbox);Reset(FileAccessCheckbox)
FileAccess
FileAccessCheckbox
OnCheck: Reset(WirelessSysCheckbox);Reset(AllCheckbox);Reset(PhonesCheckbox);Reset(JDECheckbox);Reset(InternetAccessCheckbox)
Thanks! This worked for me as well 🙂
User | Count |
---|---|
253 | |
106 | |
88 | |
51 | |
43 |