web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ChoiceField - CheckBox...
Power Apps
Unanswered

ChoiceField - CheckBox (Mulitple Selection ) In Sharepoint List- How to use in Powerapps

(0) ShareShare
ReportReport
Posted on by 641

Hi,

 

I`ve a requirement, where it needs to be multiple selection in Powerapps and update with same selection in sp list Choice field(Checkboxes).

 

Choice field name- Project Types

 

I got an issue while performing a way:

 

1) Project Types field - If I create multiple check boxes within field,

 

panand99_0-1606325322986.png

On OnCheck and OnUnCheck for each checkbox- Create temp collection

ClearCollect(
SelectedTypes,
If(chkMicro.Value,"Micro"),
If(chkCFA.Value,"CFA"),
If(chkPipe.Value,"Pipe")
);
ClearCollect(
SelectedTypes,Filter(
SelectedTypes,
!IsBlank(Value)
)
)

On Update of project type field- getting error -SelectedTypes.Value - erroe is - expecting record value.

Is there any other way to achieve this?

 

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @panand99 

    You don't need a collection to do all of this, but if you can share your formula where you are experiencing the error?

  • panand99 Profile Picture
    641 on at

    Hello @RandyHayes 

     

    On Update of project type field- getting error -SelectedTypes.Value - error is - expecting record value.

     

    SelectedTypes is collection.

     

    Is there any other way to achieve this, please let me know.

     

    I am using help from this, but got error on update property.

    https://365basics.com/powerapps-using-checkbox-controls-with-multi-valued-choice-columns/

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @panand99 

    Gotcha...

    So, the article is not such the best of ways to go about this in your case.

     

    Here is where I would go with it. 

    It seems that your Checkbox names are identical to the names of the values in your Multi-choice column.  If not, then adjust accordingly.

     

    1) get rid of all the collections and OnCheck and OnUncheck formulas - they are not needed.

    2) Set your update on your DataCard to the following (note: this accommodates 3 checkboxes, alter the pattern for additional if you need)

    ForAll(Sequence(3),
     Patch(
     Switch(Value,
     1, If(chkMicro.Value, {Value: chkMicro.Text}),
     2, If(chkCFA.Value, {Value: chkCFA.Text}),
     3, If(chkPipe.Value, {Value: chkPipe.Text})
     ),
     {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}
     )
    )

     

    3) Set the Default property of your check boxes to the following:

    Self.Text in ThisItem.'Project Types'.Value

     

    This will give you what you are looking for.

     

    Now, if the Text of your Checkboxes DO NOT match the values in your Choice column, then replace the above references to the .Text properties to the actual text values that match.

    i.e.  If(chkMicro.Value, {Value: chkMicro.Text}) would become If(chkMicro.Value, {Value: "Micro"})

       and Self.Text in ThisItem.'Project Types'.Value would become "Micro" in ThisItem.'Project Types'.Value

       etc.

     

    Give that a shot and you should find it provides what you need.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard