Configuring the “Yes or No Checkbox” Control in Dataverse Forms
Introduction: As many users dive into the functionalities of Dataverse, a recurring challenge arises: how does one efficiently integrate a checkbox to set a Yes/No Boolean field? While the default settings may present certain limitations, there are workarounds that enhance user experience. This article will provide a comprehensive guide on harnessing the yes or no checkbox control within Dataverse.
The Challenge with Dataverse Yes/No Columns
Initiating work with Dataverse’s Yes/No columns might seem slightly complicated at first glance. Specifically, the form designer doesn’t readily offer a checkbox or toggle control for the Yes/No fields. Instead, users are met with a default dropdown, leading to a potential mismatch in expectations and actual form behavior.
Transforming the Form: From Dropdown to Checkbox
Let’s delve into how to revamp a form, enabling users to exploit the yes or no checkbox control for setting Boolean fields. Using an auto-generated modern app initiated from the ‘start with data’ template, we’ll base our demonstration on the ‘EmployeesData’ table. Specifically, we’ll focus on a column named ‘CertificationStatus’.
Upon inspection, it becomes evident that the control type for ‘CertificationStatus’ does not present a checkbox option. We are typically faced with options such as ‘View option set single-select’ or ‘Edit option set single-select’.
Steps to Implement the Checkbox:
- Unlock the CertificationCard pertaining to the ‘CertificationStatus’ field.
- Introduce a checkbox control within this card. For illustrative purposes, let’s call this checkbox ‘chkCertStatus’.
- For mirroring the correct existing value onto this checkbox, adjust the Default property as:
(ThisItem.CertificationStatus = 'CertificationStatus (EmployeesData)'.Yes)
- For ensuring the card updates the field post-saving, alter the Update property to:
If(chkCertStatus.Value = true, 'CertificationStatus (EmployeesData)'.Yes, 'CertificationStatus (EmployeesData)'.No )
- Post these configurations, eliminate the original Combo box control from the card. Doing so may trigger an error connected to the error label’s position. Address this by renaming ‘DataCardValue18’ (the previous combo box control) to ‘chkCertStatus’.
Once these steps are executed, the ‘CertificationStatus’ field can be effortlessly set using our new yes or no checkbox control.Conclusion:
While Dataverse may not directly facilitate a checkbox control for Yes/No fields, with the above guide, the process is simplified. By manually tweaking certain configurations, the checkbox control becomes accessible, enhancing the form’s usability and intuitiveness.
Encounter challenges or have more queries regarding Dataverse or any other tech topic? Feel encouraged to contact us. Our expert team is eager to assist and guide you, ensuring optimal solutions to your tech needs.