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.
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.
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
We are excited for the next Super User season.
FIll out a quick form to claim your community user group member badge today!
Features releasing from October 2020 through March 2021