Showing results for 
Search instead for 
Did you mean: 

Refreshing subgrid send wrong data to PCF dataset control

Maybe this is an unsupported scenario but this is how I am testing my PCF dataset control for NN relationship.


So, my control allows to represent all available records for a NN relationship as checkboxes. User can tick the checkbox and it associates records. They untick the checkbox to disassociate records.


To check that everything works as expected, on my form, I added the same subgrid twice, one with my PCF control, one with standard subgrid. This way, I can check quickly if records are correctly associated.


The problem I found is that refreshing the standard subgrid triggers the updateView method of my PCF but the method receive the records that were visible in the standard subgrid before the manual refresh, but not the ones actually associated. 

Let me be more specific : I'm loading my form and can see two checkboxes ticked in my PCF control and two records associated in the standard subgrid.


If I untick one checkbox, it disassociates the record. The subgrid is not automatically refreshed (should it be? do I have to do something to force it being refreshed?). If I refresh manually the subgrid, the updateView method is triggered with both records : the one still associated and the not associated anymore but that was visible in the subgrid before the manual refresh.


It seems like a bug to me (unless I should do something on my PCF to force the other subgrid to refresh automatically): the updateView method should receive only the records effectively associated.


Any thoughts?

New Member

Hi @TanguyT . I'm seeing the exact same issue. Did you find any solution in the meantime? 

I have built in a refresh function on my Control (refreshing the dataset) and when I press it 2-3 times after disassociating records, suddenly the correct data appears. Until then I Can see in Debugger that the dataset is actually receiving associated records which are not associated anymore.

First I thought it was a Timing issue as my disassociation Operation is running somewhat asynchronous, but it isn't Timing. The same behavior Can be seen if you wait some time before refreshing the Control.

I resolved it by not relying on the data set refresh but by querying the data directly using web api after associate / disassociate finished. Works like a charm.

It's probably worth emphasising something that was mentioned when the TSQL interface was announced in preview.


The TSQL dataset comes from a readonly Azure SQL replica of your PowerApp database. What wasn't said but is obvious when you watch things is that read requests come from a readonly Azure SQL replica and that means there is now a slight delay between a record being updated and the change being reflected across all the replicas.


The time you would really notice this is when deploying and testing a plugin (I find I need a 15-30 second delay between deployment and testing to be sure the new version of the plugin is being ran) and I can see why retrieving a view would have the same impact. 


If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Helpful resources

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Users online (5,583)