cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mr-dang
Community Champion
Community Champion

Refresh() is ~30s delayed

I have an app where:

  1. A user Refreshes the datasource on CDS, then updates a record in a datasource.
  2. If you view the data in the entity, the change is instant and confirmed.
  3. Another user on another device Refreshes the datasource to view changes.
  4. Although the change is confirmed in the entity, the other user does not detect the change for 34s--pretty consistently.

Is this delay in place on purpose? Since the timing is so consistent, it seems to be built in.

Microsoft Employee
@8bitclassroom
5 REPLIES 5
hpkeong
Community Champion
Community Champion

Hi

 

Currently,I am using Excel DropBox, the changes for user in Device A can be Refreshed and viewed almost instantly in Device B.

(Either Android - Android, Android - iOS, Android - Win 10, vice verse).

Guess maybe CDS problem?

(I have not been using CDS for couple of weeks)

 

Just wonder of the difference...

hpkeong
mr-dang
Community Champion
Community Champion

 

2017-04-01 (4).png

 

 I ran a test where

  • I had two user accounts logged into different browsers: Google Chrome regular and Google Chrome incognito.
  • I opened the app in both browsers.
  • You can increase and decrease the value of a record using the bottom buttons. 
  • The top button refreshes the datasource and sets at the affected record to a context variable, checkstatus.

The result is that changes to the affected record are not detected from one browser to the other until 34s have elapsed (changes within one browser are detected in that browser).

Microsoft Employee
@8bitclassroom
mr-dang
Community Champion
Community Champion

To put this into perspective of why this is a huge problem:

 

If one user updates data and another user attempts to update the same one within 30s, then they will not have detected the previous changes.

 

In additional testing, the change may not be detected for minutes. So Refresh() is not always working correctly. The surefire way of detecting new changes is to reopen the app or reload the webpage.

Microsoft Employee
@8bitclassroom
mr-dang
Community Champion
Community Champion

Essentially, only one user can be on the app at any given time. There is no point to multiple instances or users because they can't receive the most up-to-date data. 

 

Is the delay by design or is it on schedule to be eliminated?

Microsoft Employee
@8bitclassroom
mr-dang
Community Champion
Community Champion

I don't know what you had changed, but it seems the 30s delay is less significant. 

 

I had stored a variable online into a CDS entity. When the variable was false, then users could post messages. When I turned the variable on, it activated moderation mode, so user messages would need to be confirmed before they were visible.

 

It was only possible for this variable to work if changes to the entity were immediately recognized between different computers. There has clearly been an improvement in CDS. It is nice to discover these things, but I feel the PA team could get more credit if these improvements were fully communicated.

 

Thank you.

Microsoft Employee
@8bitclassroom

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 (2,391)