cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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

Highlighted
Anonymous
Not applicable

Re: PowerApps not fetching new data from View using IDENT_CURRENT

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

 

@Anonymous 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (5,161)