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 / data source supplied t...
Power Apps
Unanswered

data source supplied to function is invalid and storing multiple repeated fields.

(1) ShareShare
ReportReport
Posted on by 88

Hello guys,

 

i am trying to create a collection based on some items in a gallery that i have to be displayed in another gallery in the next page in this way, and I am also creating the main collection here as well:

 

 

 

///////////selecting the selected IR items:

ClearCollect(
 colSelectedItems,
 Filter(
 gallItems.AllItems,
 'IR Request ID'.'IR Request Id' = galIR.Selected.'IR Request Id'
 )
);


/////---------- creating the po supplies patch colllection:

ClearCollect(
 POSuppliesItemsCol,
 {
 'Expenditure Type': "",
 'Deliverables': "", 
 'PO Id': "",
 'New Quantity': "", 
 'Date Promised':"", 
 Amount: "", 
 'Previous Quantity': "", 
 'New Unit Price': "", 
 'Previous Unit Price': "", 
 UOM: "",
 WBS: ""
 }
);

 

 

 

 now in the next page i have the gallery called galPO, and there I have the item set to 

colSelectedItems, so i can access some columns values using Thisitem. then there, i have a button on every record in the gallery where i am trying to patch my collection and where i am getting the error, the button is not visible, so the patch process should be done automatic
 

 

 

Patch(
 POSuppliesItemsCol,
 {
 'Expenditure Type': ExpenditureTypeInp.Text,
 'Deliverables': DeliverablesInp.Text, // Removed extra space
 'PO Id': NewPOID,
 'New Quantity': Value(newQuantityInp.Text),
 'Date Promised': DatePromisedInp.SelectedDate,
 Amount: Value(AmountInp.Text),
 'Previous Quantity': Value(prevQuantityInp.Text),
 'New Unit Price': Value(newUnitPriceInp.Text),
 'Previous Unit Price': Value(preUnitPriceInp.Text),
 UOM: UOMInp.Selected.Value,
 WBS: WBSInp.Text
 }
);

Collect(
 POSuppliesItemsCol, {
 'Expenditure Type': "",
 'Deliverables': "",
 'PO Id': "",
 'New Quantity': "",
 'Date Promised': "",
 Amount: "",
 'Previous Quantity': "",
 'New Unit Price': "",
 'Previous Unit Price': "",
 UOM: "",
 WBS: ""
 }
);

 

 

and the fields there have this on their onchange property Select(Button1) and i have a form where their on its onSuccess property i am trying to store the info in my table:

 

ForAll(
 POSuppliesItemsCol,
 Patch(
 'PO Supplies Details',
 Defaults('PO Supplies Details'),
 {
 'Expenditure Type': ExpenditureTypeInp.Text,
 'Deliverables ': DeliverablesInp.Text,
 'PO Id': NewPOID,
 'IR Request ID': SelectedItem.'IR Request Id',
 'New Quantity ': Value(newQuantityInp.Text),
 'Date Promised ': DatePromisedInp.SelectedDate,
 Amount: Value(AmountInp.Text),
 'Previous Quantity ': Value(prevQuantityInp.Text),
 'New Unit Price': Value(newUnitPriceInp.Text),
 'Previous Unit Price': Value(preUnitPriceInp.Text),
 UOM: UOMInp.Selected.Value,
 WBS: WBSInp.Text
 }
 )
);


Clear(POSuppliesItemsCol);

 

i am still new to powerapps and i would really appreciate it if anyone can guide me with this, like why is it storing duplicates of the record and whenever i click on any of the fields in the gallery it shows me the data source error as well this is also how the page looks:nunuNMS_0-1720679004982.png

thank you in advance

Categories:
I have the same question (0)
  • developingteal Profile Picture
    392 on at

    I don't fully understand your issue.

     

    To help debug, use IfError() to pull out the specific network issue with your patch function (https). This will help you understand what is going on and help provide context if someone were to help guide you more.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard