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 / Save data collection i...
Power Apps
Answered

Save data collection into my SharePoint list doesn't works and I don't know why !!!

(0) ShareShare
ReportReport
Posted on by 35

Hello Everyone,

I'm new in this community and I found out a lot of tips but none of them works ! And I don't know why !

 

I've created a collection : ContainerCollection (With 7 columns) like ContainerCollReference,, ContainerCollBatch etc...

This collection is linked to a Gallery : Container_Gallery

I added a + button to create additional rows in my gallery and add them to my collection (Data are correctly recorded into the collection by clicking on the collection data overview)

I added a button for send and save data collected to my SharePoint list (List - Containers).

 

The problem appear with the Save Button code.

This is my code

ForAll(ContainerCollection,
Patch('List - Containers',
Default('List - Containers'),
{
Reference: ContainerCollReference,

Batch: ContainerCollBatch,

etc....

}

))

Reference is the column name into my SharePoint list

ContainerCollReference is the column name into my Collection

 

Why this code doesn't works ?

Thanks a lot for your prompt help

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Powertiti ,

     

    Suppose I create one collection and storing our data from gallery

     

    ClearCollect(
    MyCollection,
    {
    Title: "Record 1",
    Description: "This is the first record."
    }
    )

     

    Then Apply patch function to store data into share point 

     

    ForAll(
    MyCollection,
    Patch(
    SharePointListName,
    Defaults(SharePointListName),
    {
    Title: Title,
    Description: Description
    }
    )
    )

    Try this ,if u face any error send screen sorts

    Thanks ,

  • Powertiti Profile Picture
    35 on at

    It exactly what I've already done.

    Find below the entire flow from the beginning

     

    Step 1 : Collection creation

    By triggering the button (Some word are in french because I'm frenchy guy^^) the collection is created and Open a PopUp windows

    1.jpg

     

    Step 2: Gallery overview

    Gallery is connected to the Collection

    2.jpg

     

    Step 3: + Button configuration

    How my button is configured for collecting data and create a new row

    3.jpg

     

    Step 4 : Test and looking data collection informations

    I've created two row with data. Data looks properly stored into the collection.

    Collection data below

    4.jpg

    Gallery data below

     

    5.jpg

     

    Last Step5 : Saving button configuration with Error

    Liste - Suivi des containers is my SharePoint List

    6.jpg

     

    as you shared above, my code matches yours but error block me without giving me a real reason of !

    Hope you gonna find the reason why !?

    Thanks in advance for your help

     

     

  • Verified answer
    Powertiti Profile Picture
    35 on at

    I found out how to solve my problem by deleting Default function !

    Find below the working code

    ForAll(CollectionName,
    Patch(ListName,
    {
    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,
    }
    )
    )

    Now I'm facing on two new problems. 

    First one :

    The date collected into my collection is not recognize as a Date but as a Text !! Even if no Text are configured in my collection. 

    Last one:

    An empty line is created when I submit the data from my collection. I will have to find out how to remove this one before submitting the data to the list.

     

    I gonna share solution as soon as I found out how to solve it ^^ !

    or maybe you have a solution to share with me?

     

    Keep in touch

  • Powertiti Profile Picture
    35 on at

    Removing last blank row from collection has been managed like that :

     

    RemoveIf(CollectionName, IsBlank(CollectionColumnName));

    ForAll(CollectionName,
    Patch(ListName,
    {
    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,
    }
    )
    )

     

    Next will be the date format

     

  • Powertiti Profile Picture
    35 on at

    And for the date issue, this is how I handled the problem.

    RemoveIf(CollectionName, IsBlank(CollectionColumnName));

    ForAll(CollectionName,
    Patch(ListName,
    {
    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,

    ListColumnName: CollectionColumnName,

    ListColumnDate: DateValue(CollectionColumnDate)
    }
    )
    )

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard