cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerwood
Helper II
Helper II

Losing Data in Two Fields

I am having an issue in which two dataverse fields are losing data when I ClearCollect in Powerapps. Here is the situation.

 

Data is entered into a dataverse table via the Patch function in Powerapps. At the end of the Patch function, we run a ClearCollect (named "BidsCollection") to update a gallery on the page with the new data. This works fine. There are 17 fields (text, dates, lookups) that are all added as a new record to the dataverse table through this Patch function.

 

The same ClearCollect to BidsCollection is stored in the OnVisible property for the page. When I navigate away and back to the page, data in two of the fields are deleted. The two fields are simple text fields. When I view the Collection, I can see the columns for these fields, so I know the column is part of the Collection too.

 

I then try to fix the issue by entering the data directly into Dataverse via Edit Record on the Data Tab in the table. This saves fine and the data is shown in the table in Dataverse. But when I go back to the app and navigate to the page that runs the ClearCollect, the data in the two fields are deleted.

 

What am I doing wrong? I first had the initial data entered using a New Form in Powerapps. I thought there was an issue with how the data was entered there, so I changed it over to a Patch function instead. But that did not solve the problem. Through trial and error, I am narrowing it down to the navigation to the page that has the OnVisible property as the ClearCollect.

 

I am having a similar issue elsewhere on my app, with another gallery and different fields. I'm hoping if I find a solution for this one, I can apply it to the other issue as well.

 

Thank you. 

 

2 REPLIES 2
powerwood
Helper II
Helper II

I believe I narrowed this down to the ClearCollect function. I have a button that runs the same ClearCollect function on the BidsCollection collection. When I click that button, it deletes the data from the two fields.

 

Any help would be greatly appreciated.

powerwood
Helper II
Helper II

I removed the ClearCollect function associated with the data. But the problems persists. Now I have the gallery pointing directly to the data table in Dataverse (CDS) but the data in the two text fields still disappear. I'm beginning to think this is an issue with the fields and how the app interacts with them. So here's more information on the fields.

 

Both fields are Text fields in Dataverse. The app page accesses the data via a gallery. The Default property of the text field is "ThisItem.Address_City" and "ThisItem.Address_State_New" which are the correct field names from Dataverse. The OnChange function is set to false. Originally, I had this set to Patch back to the datasource, but I changed it to false after the issue popped up. I thought that may have been a reason why the data was deleting. OnSelect is set to "Select(Parent)".  Here are a few other properties that might be of interest.

 

Reset = false

Display Mode = View

 

Has anyone else had an issue like this?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,117)