Create a Multiple Selection Checkbox Application in Power Apps with a focus on achieving seamless integration with SharePoint

Create a Multiple Selection Checkbox Application in Power Apps with a focus on achieving seamless integration with SharePoint. 

Create SharePoint List:

  • First, sign in at the Sharepoint porta.
  • Select the site collection where you wish to create the list.
  • Then, in the upper-right corner, click on the ‘Gear’ icon and choose ‘Site Contents’.
Login screen of SharePoint portal for Power Apps Checkbox integration

Once on the website’s content page, click ‘New’ and then select ‘List’

  • You’ll now access the ‘Create a SharePoint list’ page.
  • Choose the ‘Blank list’ option.
Creating a new list in SharePoint to use with Power Apps Checkbox

Next, assign a ‘Name’ to your list and add an optional description. Then, click the ‘Create’ button

  • Afterwards, you can append additional columns to your dataset using the ‘+Add column’ function.
  • Please include the following columns in the dataset: “Title” (single-line of text), “Name” (Single-line of text), “Start Date” (Date and Time), “End Date” (Date and Time) and “Requirements” (Choice). 
Adding columns to SharePoint list for tracking Power Apps Checkbox selections

Please incorporate the following columns: Requirements (choices) column, which should include four selectable options: Power Apps”, Power Automate and Power BI. Ensure that the Allow Multiple Selections setting is activated to permit the selection of multiple skills simultaneously. 

Kindly enter this data into the designated SharePoint list. 

In the SharePoint list interface, kindly select the “Edit in grid view” Input this data into the SharePoint list. 

Editing SharePoint list in grid view to manage Power Apps Checkbox data

Upon completion, kindly select the ‘Exit Grid View’ option. 

Exiting grid view mode in SharePoint after configuring Power Apps Checkbox options

Create a New Canvas App:

  • Go to the Power Apps portal and sign in. 
  • Click on “Create” and select “Canvas app from blank.” 

Develop an application titled ‘App Name’ and optimize it for tablet devices in the desired format. 

Developing a tablet-optimized Canvas app for SharePoint with Power Apps Checkbox

Navigate to the “Data” section located in the left-hand menu. Proceed to choose the “Add data” option, and subsequently, initiate a search for “SharePoint” within the provided search bar. 

Connecting Canvas app to SharePoint data for Power Apps Checkbox synchronization

Please choose the option labeled ‘Add a connection.’ 

Choose the option 'Add a connection' for Power Apps Checkbox synchronization

To establish a connection with SharePoint Online, kindly opt for the “Connect directly (cloud services)” option and subsequently click on the “Connect” button. 

Selecting the 'Connect directly (cloud services)' option for SharePoint Online integration in Power Apps

Establish a connection to a SharePoint site by accessing the “Recent sites” list, either by entering the site’s URL manually or pasting it, followed by clicking the “Connect” option. 

In the ‘Choose a list’ section, please check the boxes corresponding to the lists you wish to utilize, and subsequently click on the ‘Connect’ option. 

Multiple Selection Checkbox' from a SharePoint list in Power Apps before connecting

Transforming a Combo Box into a Gallery Interface

Create a title bar by placing a label at the uppermost section of the screen, bearing the text “Projects”. 

Additionally, incorporate these “size. 

Setting width and height in SharePoint Power Apps for custom checkbox sizing

Kindly navigate to the “Insert” menu situated in the left-hand navigation panel. Subsequently, proceed to identify the “Edit Form” element. Please position the edit form below the title bar. 

Additionally, incorporate these Size” and “Position. 

Setting position and size for a checkbox element in SharePoint Power Apps

Please incorporate your designated “Data source” within the “Edit Form. The “Form” should initially incorporate all 6 fields from the SharePoint list as standard elements. 

Please begin by selecting the “Attachments Data Card. Once this card is unlocked, proceed to “Delete” the Attachments Data Card. 

Unlocking and deleting the Attachments Data Card in SharePoint Power Apps for checkbox customization step-1
Unlocking and deleting the Attachments Data Card in SharePoint Power Apps for checkbox customization step-2

To Change properties, kindly ensure that all data cards are unlocked. 

Unlocking data cards in SharePoint Power Apps form for editing checkbox properties

Please Delete the combo box and increase the dimensions of the card to accommodate the checkboxes. Error messages will be addressed in due course. 

Deleting a combo box to customize card size for SharePoint Power Apps checkboxes

Additionally, incorporate these “size”. 

Adjusting card size properties for a SharePoint Power Apps checkbox layout

Please access the “Insert” menu located in the left-hand navigation panel. Next, locate and select the “Blank vertical gallery” element. Drag and drop it onto the Requirements Data Card. 

Inserting a blank vertical gallery into a Power Apps form for SharePoint checkbox functionality

Additionally, incorporate these “Size” and “Position”. 

Setting size and position for a vertical gallery in SharePoint Power Apps checkbox configuration

Incorporate the following code into the ‘Items’ property. The ‘choices’ function is responsible for populating the gallery with a table of permissible options. 

Configuring 'Items' property with 'choices' function for SharePoint Power Apps checkbox in gallery control
				
					Choices('Multiple Selection Checkbox'.'Requirements')
				
			

Please proceed by selecting a checkbox element from the input menu and inserting it within the gallery. 

Inserting a SharePoint Power Apps checkbox within a gallery control interface

Additionally, incorporate these “Size” and “Position”. 

Positioning & Sizing a SharePoint Power Apps checkbox within a gallery control interface

With the inclusion of this code within the text property, the checkboxes will now display the labels ‘Power Apps’, ‘Power Automate’ and ‘Power BI’ adjacent to them. 

SharePoint Power Apps interface displaying checkboxes with Power Apps, Automate, and BI labels
				
					ThisItem.Value
				
			

Tracking Current Checkbox Selections

  • The Project Manager augments the project with one or more skills and subsequently submits the associated form. With the implementation of the multiple selection checkbox feature, it becomes imperative to systematically monitor and record the selected skills within a designated collection. Subsequently, this collection is to be synchronized with SharePoint upon the completion of the form. 
  • Please ensure that you have selected the checkbox that has been positioned within the gallery. Subsequently, incorporate the following code snippet into the ‘OnCheck’ property. This code is designed to capture and store the checkbox’s value within a collection named ‘ skilledcol ‘ when it is marked as checked. 
Configuring SharePoint Power Apps checkbox for tracking selections in project management
				
					Collect(skilledcol, ThisItem.Value)
				
			

In contrast, our objective is to eliminate a skill from the skilledcol when a checkbox is deselected. 

Deselection of skills in SharePoint Power Apps checkbox functionality

Please place this code within the OnUnCheck event handler of the checkbox. 

				
					RemoveIf(skilledcol, Value=ThisItem.Value)
				
			

Implementing Multi-Selection Checkbox Functionality in SharePoint

The modification of the card’s Update property dictates the data transfer to SharePoint upon form submission. It is recommended to amend the Update property toskilledcol. 

Modification of the card's Update property with SharePoint Power Apps Checkbox functionality

Additionally, incorporate this code within the “Update” property of the Requirements Data Card. 

				
					skilledcol
				
			

One of the error messages has been successfully resolved. To eliminate the remaining error message, it is recommended to remove the ErrorMessage label, as it is deemed unnecessary for the current application. 

Correcting error handling in SharePoint Power Apps Checkbox interface

Establish the “Default Mode” of the “Form” to “New. 

Setting up a new entry form with SharePoint Power Apps Checkbox functionality

Add a new “Button element beneath the form. 

Add a new “Button” element beneath the form with Power Apps Checkbox functionality

In the “OnSelect” property of the button, insert the provided code. Execute the button by clicking it to initiate the data transfer to SharePoint. 

Customizing the OnSelect property of the button with Power Apps Checkbox functionality
				
					SubmitForm(Form1)
				
			

When the form is submitted, our objective is to present the current record in a read-only mode. 

Displaying a SharePoint form in read-only mode with Power Apps Checkbox after submission

Implementing a few additional lines of code will effectively achieve the desired outcome. It is advisable to incorporate the provided code within theOnSuccess property of the form. 

				
					Set(varcurProject,Form1.LastSubmit); ViewForm(Form1);
				
			

Please author the following code within the “Item” property of the form. 

Codeing within the Item property of the form with Power Apps Checkbox after submission
				
					varcurProject
				
			

Populating a Form with Multiple Checkbox Selections

  • We are currently in the final stages of development. The Projects Backlog application requires an enhancement to include the presentation of the requisite skills associated with a project. This feature is essential to facilitate the Project Manager’s ability to comprehensively assess projects during subsequent reviews. 
  • Create a new user interface screen and incorporate a blank gallery element, configuring its “Items” property to utilize a “Multiple Selection Checkbox” Data source. 
Configuring a SharePoint form to use a Multi-Selection Checkbox in Power Apps

Additionally, incorporate these “size”, “Position” and “Border”. 

Customized size, position, and border settings for Multi-Selection Checkbox in Power Apps

The gallery should be designed to resemble the image provided. It is imperative to incorporate a Label within the gallery’s layout, utilizing the ‘Text‘ property to display the project name, identified as ThisItem.Title.’  

Adding a Label within the gallery's & utilizing the Text property to display the project name

Additionally, incorporate this code within the ‘OnSelect‘ property of the Label. 

Codeing within the OnSelect property of the Label for Multi-Selection Checkbox in Power Apps
				
					Set(varcurProject, ThisItem);
ClearCollect(skilledcol, varcurProject.Requirements);
EditForm(Form1);
Navigate(Screen1);
				
			

Additionally, incorporate these “Border”. 

Customization on the Border for Multi-Selection Checkbox in Power Apps

Additionally, an “Arrow Right” icon positioned to the right should be included to signify the gallery’s select ability. Incorporate the following code within theOnSelectproperty of the ‘Button’ to achieve the following tasks: retrieve information pertaining to the present project, ascertain the necessary skills, transition the form to ‘Edit Mode, and subsequently navigate to the screen for creating a Screen using the Screen 1. 

Button with 'Arrow Right' icon for project info, skills, edit mode, and Screen 1 creation in PowerApps
				
					Set(varCurProject, ThisItem);
ClearCollect(skilledcol, varCurProject.Requirements);
EditForm(Form1);
Navigate(Screen1);
				
			

The absence of highlighted checkboxes is attributed to the need for the assignment of default values to them. 

Assign default values to checkboxes for highlighting for Multi-Selection Checkbox in Power Apps

Incorporate this code within the “Default” property of the checkbox. 

				
					ThisItem.Value in skilledcol.Value
				
			

Additionally, please include a “Right Arrow” icon in Screen 1 to navigate to Screen 2. 

Add 'Right Arrow' icon with 'OnSelect' property for navigation from Screen 1 to Screen 2 in PowerApps

Incorporate this code within the OnSelect property of the “Right Arrow” icon. 

				
					Navigate(Screen2)
				
			

The Conclusive Appearance of this Application

Showcasing the final layout of SharePoint Power Apps Checkbox in the Projects Backlog app
Showcasing the final layout of SharePoint Power Apps Checkbox in the Projects Backlog app Screen2

If you want to learn more about the Power Apps, feel free to explore our other informative articles and tutorials.

Have additional inquiries? Our team is here to assist. Please don’t hesitate to reach out!

About The Author