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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (13,048)