Convert Multi-Select Dropdown to Multi Select Checkboxes in Power Apps - Power Apps Tip and Hack

preview_player
Показать описание
Sometimes, we have a requirement where we need to show Multi-select checkboxes instead of dropdown in our Power Apps forms. When we are using SharePoint as a data source, what happens is, Power Apps show a choice column as a dropdown. The client mostly asks for the checkboxes in case of multiple value selection.

During this session, I'm going to explain to you one Power Apps hack or tip using which you can easily convert your Choices to Checkboxes. We will be adding some formulas to convert our dropdown to checkboxes. This tip will work for New and Edit both forms.

So, let's check the steps to convert the default dropdown to checkbox selection in Power Apps and how we can resolve a problem - Checkboxes in SharePoint list shows up as dropdown in Power Apps.

Chapters:
00:00 Introduction
00:12 Requirement
01:01 Overview of SharePoint Data Source
02:12 Customize Power Apps Form
03:07 Step 1: Add Checkboxes to convert Dropdown to Checkboxes
04:40 Step 2: Add OnCheck and OnUnCheck Event
05:30 OnCheck Event Code
07:20 OnUnCheck Event Code
07:33 Check Code with Collection
08:15 Step 3: Provide Collection on DefaultSelectedItems
08:45 Step 4: Add Code to Update Event of DataCard
09:12 Step 5: Hide Dropdown Data Card
09:37 Test Dropdown
10:03 Show Selected Value in Form during Edit Time
10:16 Step 6: Default Event Set for Edit Form
11:23 Logic Explanation during Edit Time
12:00 Code for Default Property during Edit Time
12:57 Test Edit Form
13:24 End

#PowerApps #PowerAppsTip #PowerPlatform #PowerAppsWithDhruvin #PowerPlatformWithDhruvin #DhruvinShah
Рекомендации по теме
Комментарии
Автор

Great video, I followed your instructions and works almost perfectly, for some reason when I enter on edit view, the first checkbox is not maintaining the selection made. There could be something that could be done to fix this?

pabloferman
Автор

This worked perfectly for my use case! I had one addition, though - as many others have stated, if you don't select or unselect a checkbox during an item edit, then all checkbox values are dropped when you save the form. This seems to be due to the fact that the collection is blank when the form is loaded. A workaround I found for this is to add the ClearCollect code sample ahead of any SubmitForm functions on the form. So for example:
ClearCollect(
colExample,
If(Checkbox1.Value, Checkbox1.Text),
If(Checkbox2.Value, Checkbox2.Text),
...
If(Checkbox10.Value, Checkbox10.Text)
);
ClearCollect(
colExample, Filter(
Products,
!IsBlank(Value)
)
);
SubmitForm(<formName>);

This can be added to save buttons via the OnSelect property, and can be added to the overall SharePoint integration OnSave property.

Hope this helps anyone else having this issue!

danschreiber
Автор

Hi Dhruvin, Great tutorial! When I have created my form using your system, if I try to edit a record, the correct check-boxes are selected in the form, but they don't save back to the record. Do you have recommendations about how the collection can be created in the Edit forms automatically so current selections are retained?

joydutcher
Автор

Hi Dhruvin copied the question from below, I have the same issue... When I have created my form using your system, if I try to edit a record, the correct check-boxes are selected in the form, but they don't save back to the record. Do you have recommendations about how the collection can be created in the Edit forms automatically so current selections are retained?

erikk
Автор

Hello dear thank you for your video but it is not working i have a problem with the products name of the collection . Did you name it on another properties . Because I got an errors telling me that name isn't valid

ahmadyamout
Автор

This is great video. Thanks you solved my issue

yaredtar
Автор

When I select all checkboxes it's showing error and in collection items also not storing, can you please tell why is it happens

palikaanusha
Автор

Hi thanks for the information..I want to hide the another text input control based the selected value in this checkbox (inside gallery).. what should I writ in the visible property of that text input

mahalakshmi
Автор

Hello Dhurvin,

Great video on multi select checkbox column. When I submit the form and I need to submit the data to the list and reset my form. All other objects get reset except for the check boxes. I followed the video to covert a dropdown to check boxes. But it is not working. Please advice
Thank you

venkatagavili
Автор

Good knowledge for new PowerApper like me. My question is if you create Checkbox control within Gallery control, what codes are in those 2 controls? Please suggest. Thanks.

porntheppunjajitti
Автор

Hi Dhruvin, can you also show an example on how to store multiple value dropdown list using Dataverse/CDS?

clyde
Автор

Hi Dhrivin, Great video it was helpful and How could i make one of the checkbox to default so that if the user will check nothing but it should be saved to SharePoint list

ajaychowhan
Автор

I had an issue using this method for a field that requires at least one of the options checked. Instead of using a collection in DataCard.Update, I used a formula to build the table:

Filter(
Table(
{Value: If(Checkbox1.Value, "Checkbox1")},
{Value: If(Checkbox2.Value, "Checkbox2")},
{Value: If(Checkbox3.Value, "Checkbox3")},
{Value: If(Checkbox4.Value, "Checkbox4")}
),
!isBlank(ThisRecord.Value)
)

With this you don't need any code in the OnCheck and OnUncheck properties. (I also deleted the original dropdown control after changing the properties in the Error Message label that referred to it.)

robartsd
Автор

Hi dhruvin, i implemented according this and its working, but when i edit and save (without changing checkbox) item in the list all multiple coma seprated values having null values, kindly suggest 🙏

deepakbhargava
Автор

Any sources of info on how to do this when the source of the values/options for "Product Category" is another Sharepoint list "Product Categories" ??? (values not embedded in the Sharepoint list column??

honkbob
Автор

How did you get your app to run on the right side of the sharepoint list?

colby
Автор

The auto populate is not working. They still show up false when looking at each form entry. Data card default is, ThisItem.'Survey Type' and the default for my checkboxes is, Self.Text in Concat(ThisItem.'Survey Type', Value&", ")

colby
Автор

sir, how to patch checkbox collection to sharepoint?

anujasule
Автор

Hi, Now to add check box field in powerapps

gayugayumoorthi
Автор

Hi Dhruvin, awesome tutorial....I have faced one issue after doing all the steps in edit form and click on submit button, so it return to display form where my checkboxes are randomly selected by their own, I have checked my collections, in collection values are correct but in display mode checkboxes checked randomly, I really request you to please help me

nanditaanand
join shbcf.ru