cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TiagoFreire
Continued Contributor
Continued Contributor

PowerApps not fetching new data from View using IDENT_CURRENT

I have this very simple View:

 

SELECT        ident_current('dbo.tccs') AS 'identity'

Table dbo.tccs has a column with identity and initial value 60000.


And I am trying to fetch the current value of the identity with the assistance of the View above. 

It always returns one row with one column, as expected. 

On SSMS, querying the View always returns the expected results. If a row is added, the identity is autoincremented. 

 

On PowerApps however, it only fetched the value the first time, and recorded 60000 on a variable - and a collection for good measure (debugging). 

After each insert, as expected, the value of IDENT_CURRENT increments by 1, and with SSMS I can query and verify that the value is correct and the View works. (Currently at 60003).

However, in PA  subsequent calls to read the View are still returning the value in the initial query - 60000. 

The incremented value is not fetched even more than 15 minutes after the first insert.

 

I don't know if the fact that the View only uses a function as its source, but not a table directly, has any relation to this issue.

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @TiagoFreire 

This might be a caching issue.  If you refresh your view before you try to view it, do you see the correct value?

Refresh('[dbo].[YourViewName]')

There was a similar problem a while ago, but I believe that's been fixed.

https://powerusers.microsoft.com/t5/General-Discussion/Refresh-not-working/m-p/236212

View solution in original post

2 REPLIES 2
timl
Super User
Super User

Hi @TiagoFreire 

This might be a caching issue.  If you refresh your view before you try to view it, do you see the correct value?

Refresh('[dbo].[YourViewName]')

There was a similar problem a while ago, but I believe that's been fixed.

https://powerusers.microsoft.com/t5/General-Discussion/Refresh-not-working/m-p/236212

View solution in original post

Anonymous
Not applicable

Hi @TiagoFreire how are you progressing with this? Was the above reply helpful?

 

@Anonymous 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,310)