Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

The data source supplied to the function is invalid. Bulk Patch update collection

(0) ShareShare
ReportReport
Posted on by 722

I am trying patch a collection with another collection but I am getting the error, "The data source supplied to the function is invalid"

 

 

//Created a duplication of data source with old codes
ClearCollect(colColourCodes,ColourCodes);

//Created an duplication of data source that is empty
ClearCollect(colCodeNo, Defaults(ColourCodes));
Clear(colCodeNo); 


//Gets all the codes that are stored in a string and creates a list
ClearCollect(
 colCodeNo,
 ForAll(
 ForAll(
 Split(lblCodes.Text, ","), {Result: ThisRecord.Value}) As row,
 With({
 recAC: Find("'", row.Result)
 },
 {
 Approval_Code: Mid(row.Result, recAC+1, 8),
 Available: "y",
 RequestID: Blank()
 }
 )
 )
);

//Error occurs when bulk patching
Patch(colColourCodes, colCodeNo);

 

Not sure why the error is occurring given I created both collections with the same data source.

Categories:
  • rpersad Profile Picture
    722 on at
    Re: The data source supplied to the function is invalid. Bulk Patch update collection

    Any feedback is appreciated.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,942 Most Valuable Professional

Leaderboard