cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andrewp3283
Frequent Visitor

Creating on Sharepoint List item from multiple values in powerapps

I have multiple checkboxes with my application and the user can select which activity they require, what I need to do is then store those selection of either Yes or No on one record on the sharepoint list for example:

 

Selections:

Activity1

Activity2

Activity3

 

If Activity 1 and 3 are selected then the list item should be

Activity1 = YES

Activity2 = NO

Activity3 = YES

 

I cannot figure out the process for doing this, have been looking at some kind of collection and then sending that to the SP List but cant get all the values into one collection.

1 ACCEPTED SOLUTION

Accepted Solutions
Roverandom
Solution Supplier
Solution Supplier

What is the data type of the column in the SharePoint list?

You can create a Record variable like this:

Set(
    gblRecordActivities,
    {
        Activity1: Checkbox1.Value,
        Activity2: Checkbox2.Value,
        Activity3: Checkbox3.Value
        // and so on
    }
)

 

Roverandom_0-1663204101476.png

 

 

To Patch in SharePoint (assuming the column is text):

Patch(
    SPList,
    Defaults(SPList),
    {
        Column1: gblRecordActivities.Activity1,
        Column2: gblRecordActivities.Activity2
        //...
    }
)

 



Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.

View solution in original post

2 REPLIES 2
Roverandom
Solution Supplier
Solution Supplier

What is the data type of the column in the SharePoint list?

You can create a Record variable like this:

Set(
    gblRecordActivities,
    {
        Activity1: Checkbox1.Value,
        Activity2: Checkbox2.Value,
        Activity3: Checkbox3.Value
        // and so on
    }
)

 

Roverandom_0-1663204101476.png

 

 

To Patch in SharePoint (assuming the column is text):

Patch(
    SPList,
    Defaults(SPList),
    {
        Column1: gblRecordActivities.Activity1,
        Column2: gblRecordActivities.Activity2
        //...
    }
)

 



Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.
andrewp3283
Frequent Visitor

Excellent thanks for that - I was stuck in a loop and could not see another option to get around it 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,870)