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

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

Administrator
Administrator

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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 45 members 4,054 guests
Please welcome our newest community members: