cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TiagoFreire
Level 8

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
Super User
Super User

Re: PowerApps not fetching new data from View using IDENT_CURRENT

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
Super User
Super User

Re: PowerApps not fetching new data from View using IDENT_CURRENT

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

TopShelf-MSFT
Level 10

Re: PowerApps not fetching new data from View using IDENT_CURRENT

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

 

@TopShelf-MSFT 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,759)