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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to store multiple ...
Power Apps
Unanswered

How to store multiple column values in a gallery into single column values in SharePoint list.

(0) ShareShare
ReportReport
Posted on by 18

Hi ,

I have a gallery in powerapps as

Product ,Quantity, Okt-23,Nov-23,Dez-23,Jan-24,Feb-24,Mar-24........ //Column Names

Abc  1.      0. 0. 0 .1. 0. 0

Xyz.  3       0. 0. 0 .2. 1 0

Pqr.   2       0. 0. 0 .1. 0. 1

Lmn . 3       0. 0. 1 .1. 1 0 // Values

 

And Have a SharePoint list as

Product. Quantity. Month //Column Names

Abc. 1. Jan-24

Xyz. 2. Jan-24

Xyz. 1 Feb-24

Pqr 1. Jan-24

Pqr 1 Mar-24

Lmn 1 Dez-23 

Lmn 1. Jan-24

Lmn  1. Feb-24. //Values

have to store that gallery values as below in SharePoint list , and I am displaying these SharePoint list values only as default in that gallery months columns And product & quantity displaying from another SharePoint list in gallery.

 

Thanks!

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Himasri ,

     

    I assume there is a collection:

    ClearCollect(
     CollectionName,
     {Product:"Abc",Quantity:1,'Okt-23':0,'Nov-23':0,'Dez-23':0,'Jan-24':1,'Feb-24':0,'Mar-24':0},
     {Product:"Xyz",Quantity:3,'Okt-23':0,'Nov-23':0,'Dez-23':0,'Jan-24':2,'Feb-24':1,'Mar-24':0},
     {Product:"Pqr",Quantity:2,'Okt-23':0,'Nov-23':0,'Dez-23':0,'Jan-24':1,'Feb-24':0,'Mar-24':1},
     {Product:"Lmn",Quantity:3,'Okt-23':0,'Nov-23':0,'Dez-23':1,'Jan-24':1,'Feb-24':1,'Mar-24':0}
    );

     

    Please try this formula to submit records,

    ForAll(
     CollectionName,
     If('Okt-23'>0,Collect(YourSPList,{Product:Product,Quantity:'Okt-23',Month:"Okt-23"}));
     If('Nov-23'>0,Collect(YourSPList,{Product:Product,Quantity:'Nov-23',Month:"Nov-23"})); 
     If('Dez-23'>0,Collect(YourSPList,{Product:Product,Quantity:'Dez-23',Month:"Dez-23"})); 
     If('Jan-24'>0,Collect(YourSPList,{Product:Product,Quantity:'Jan-24',Month:"Jan-24"})); 
     If('Feb-24'>0,Collect(YourSPList,{Product:Product,Quantity:'Feb-24',Month:"Feb-24"})); 
     If('Mar-24'>0,Collect(YourSPList,{Product:Product,Quantity:'Mar-24',Month:"Mar-24"}))
    )

     

    vbofengmsft_0-1704854921352.png

     

    Best Regards,

    Bof

     

  • Himasri Profile Picture
    18 on at

    Hi @v-bofeng-msft ,

    Thanks for your response.

     

    I have a gallery like this

    IMG_20240110_131647.jpg

    Product ID, Product, Quantity comes from a Product_Details Sharepoint list and Months data comes from Product _Planner SharePoint list based on Product ID and Product by Default.

    Now If I change the Month values in the editable gallery then I have to save that in the Product _Planner SharePoint list which has Product_ID,Product,Quantity,Month  Column Names without any duplicate data.

    Please help me out.

     

    Thanks!

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Himasri ,

     

    You could us Gallery.Allitems to get all the value inside the gallery.

     

    Best Regards,

    Bof

  • Himasri Profile Picture
    18 on at

    Hi @v-bofeng-msft ,

    My gallery has so many items so it's taking much time to just submit it. So, I am trying to select a button that collects the edited row from the gallery whenever a field is edited without duplicate data. And then submit that data to SharePoint list.

     

    Thanks 

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Himasri ,

     

    You could set the Okt-23 text input control's OnChange property to:

    Patch(
     YourSPList,
     LookUp(YourSPList,Product=ThisItem.Product && Month="Okt-23")
     {Quantity:Self.Text}
    )

     or

     

    Patch(
     YourSPList,
     LookUp(YourSPList,Product=ThisItem.Product && Month="Okt-23")
     {Quantity:Value(Self.Text)}
    )

     

    And do the same thing for other text inputs.

     

    Best Regards,

    Bof

     

  • Himasri Profile Picture
    18 on at

    Hi @v-bofeng-msft 

     

    Thanks for your response that help alot.

     

    Best regards 

     

     

  • Himasri Profile Picture
    18 on at

    Hi @v-bofeng-msft ,

     I have to submit my data with a button and when editing gallery it should be stored in a collection without any duplicates.

    And now Month column in the SharePoint list is Date column.

    Please help me out.

     

    Thanks!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard