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 / Collection stops worki...
Power Apps
Unanswered

Collection stops working in latest PowerApps Release

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am using the customise forms functionality of PowerApps to make more powerful SharePoint forms. We have a collection that populates data from another SharePoint list for line items within a Purchase Order form. When making any changes in Studio, this collection breaks and shows junk data (I believe from the first item in the Purchase Order List). I've included the ClearCollect() code below. Is there a reason why this is happening or is it just a bug? The intended data is shown as just one line, with the junk data as multiple blank lines.

 

OnNew:

 

 

NewForm(SharePointForm1);
Set(MainGUID, GUID());
ClearCollect(GoodsColl,AddColumns(Filter('PO-item',MasterID=MainGUID),"EditItem",true))

 

 

 

OnEdit:

 

 

Refresh('Raise a Purchase Order');
EditForm(SharePointForm1);
Set(MainGUID, SharePointIntegration.Selected.MasterID);
ClearCollect(GoodsColl,AddColumns(Filter('PO-item',MasterID=MainGUID),"EditItem",true))

 

 

OnView: 

 

 

Refresh('Raise a Purchase Order');ViewForm(SharePointForm1);
Set(MainGUID, SharePointIntegration.Selected.MasterID);
ClearCollect(GoodsColl,AddColumns(Filter('PO-item',MasterID=MainGUID),"EditItem",true))

 

 

 OnSelect for the button which appends items to the item line list:

 

 

Patch('PO-item', Defaults('PO-item'), {'Description of Goods/Services Ordered (by item)':Txt_Description.Text, Quantity:Txt_Qty.Text, 'Unit Price':Txt_UnitPrice.Text,Price:Txt_Price.Text, 'VAT Category': Dd_VATCat.Selected.Title, 'VAT (%)':Txt_VATRate.Text, 'VAT Total':Txt_VATTotal.Text,MasterID:MainGUID});
Refresh('PO-item');ClearCollect(GoodsColl,AddColumns(Filter('PO-item',MasterID=MainGUID),"EditItem",true));
Reset(Txt_Description);Reset(Txt_Qty);Reset(Txt_UnitPrice)

 

 

Incorrect:

2021-05-18 at 10.01.13 - Microsoft Edge.png

Correct:

2021-05-18 at 10.05.37 - Microsoft Edge.png

2021-05-18 at 10.05.37 - Microsoft Edge.png
2021-05-18 at 10.01.13 - Microsoft Edge.png
Categories:
I have the same question (0)

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard