cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
colonel_claypoo
Level: Powered On

Possible to use checkboxes instead of combobox for multi-valued choice fields?

I've worked through @CarlosFigueira's examlpes to circumvent the issue of not having had support for multi-valued choice fields here and here. Thanks for those Carlos!

 

In one of those guides checkboxes were employed but had to be used in conjunction with a single line text field.

Is it by this time possible to use multi-valued choice fields with checkboxes instead of a single line text field?

 

With the checkbox approach the Default property of a checkbox had to be set to "Choice1" in Split(Parent.Default; ",").

So I was thinking that for using the multi-valued field I could use something like "Choice1" in Split(Choices(ListName.MultivaluedChoiceField); ",") but unfortunately, this does not work.

 

The error message is Invalid argument type (table). Expected a Record value instead.

 

Any idea if it's possible to use SharePoint list multi-valued choice fields with checkboxes in PowerApps?

 

Thanks a lot.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Possible to use checkboxes instead of combobox for multi-valued choice fields?

Yes, you can now use checkboxes directly in a multi-valued choice field. For the default value of each checkbox, you'd use this expression:

"Choice 1" in ThisItem.ChoiceMultiple.Value

Where 'Choice 1' the value of the choice column associated with the checkbox, and 'ChoiceMultiple' is the name of the choice column from SharePoint. You don't need to use the Choices function here, as it would return all possible choices, and you want only the values that are saved in the list.

For the Update expression, you can use something similar - you need to have an expression whose result is a table with a 'Value' column (see this post for more details), and you can use an expression like this one to accomplish that:

RenameColumns(
    Split(
        Mid(
            Concatenate(
                If(chkChoice1.Value, "," & chkChoice1.Text, ""),
                If(chkChoice2.Value, "," & chkChoice2.Text, ""),
                If(chkChoice3.Value, "," & chkChoice3.Text, ""),
                If(chkChoice4.Value, "," & chkChoice4.Text, ""),
                If(chkChoice5.Value, "," & chkChoice5.Text, "")),
            2),
        ","),
    "Result",
    "Value")

In my example I have 5 possible values (thus 5 checkboxes), but you can configure it for your scenario.

View solution in original post

3 REPLIES 3
colonel_claypoo
Level: Powered On

Re: Possible to use checkboxes instead of combobox for multi-valued choice fields?

Hello,

is it okay to bump my own thread? I'm still looking for a solution. What can I do about the error message Invalid argument type (table). Expected a Record value instead? Would it be an option to kind of collect all the values of ListName.MultivaluedCoiceField first and combine them in a record?

 

Thanks.

Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Possible to use checkboxes instead of combobox for multi-valued choice fields?

Yes, you can now use checkboxes directly in a multi-valued choice field. For the default value of each checkbox, you'd use this expression:

"Choice 1" in ThisItem.ChoiceMultiple.Value

Where 'Choice 1' the value of the choice column associated with the checkbox, and 'ChoiceMultiple' is the name of the choice column from SharePoint. You don't need to use the Choices function here, as it would return all possible choices, and you want only the values that are saved in the list.

For the Update expression, you can use something similar - you need to have an expression whose result is a table with a 'Value' column (see this post for more details), and you can use an expression like this one to accomplish that:

RenameColumns(
    Split(
        Mid(
            Concatenate(
                If(chkChoice1.Value, "," & chkChoice1.Text, ""),
                If(chkChoice2.Value, "," & chkChoice2.Text, ""),
                If(chkChoice3.Value, "," & chkChoice3.Text, ""),
                If(chkChoice4.Value, "," & chkChoice4.Text, ""),
                If(chkChoice5.Value, "," & chkChoice5.Text, "")),
            2),
        ","),
    "Result",
    "Value")

In my example I have 5 possible values (thus 5 checkboxes), but you can configure it for your scenario.

View solution in original post

colonel_claypoo
Level: Powered On

Re: Possible to use checkboxes instead of combobox for multi-valued choice fields?

Thank you very much for your reply Carlos. I've not had the chance to test this out yet but I'm sure this will be helpful to anyone.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,034)