web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Refresh data source on...
Power Apps
Unanswered

Refresh data source only after 2nd click

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I have a very strange senarion happening.

I have a gallery acting as tabs and on my last tab I have a condition that refreshes my data souce to recalculate totals.

 

I have added in a notification to test if this is the case... and notification works.

But I have to click the relavant tab again before the data is refreshed.


The reason why its a view is beacuse Powerapp constantly failed to display calculations ... different problem for antoher day

OnSelect

 

If(
 Parent.Selected.Value.ID = "Summary",
 Refresh('[dbo].[BiReviewSummaryCalcAgg]'); // <- MSSQL View
Notify("Y u no refresh ??", NotificationType.Information) ); Select(Parent);

 

DB is still empty and has very little data.


If i use a timer it only works the first time it reached the end. After that the notifications keeps on popping up but the data never refreshes.

App setting:
All Preview Features are on except for Enable enhanced Microsoft SQL Server connector - off

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I feel like this is a problem I have encountered, it's not that the datasource isn't refreshing I think it's more to do with the selected.ID not being updated (still storing the old values hence why they don't change) try reselecting the ID from the gallery after the refresh.

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @PaulVZ ,

    I suggest you make the timer control repeatly automatically.

    Please set the Timer's:

    Repeat to true

    AutoStart to true

    AutoPause to true

    OnTimerStart to the condition that you want

    Here's a doc about this control for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-timer

    If using Timer still can not solve your problem, please tell me.

     

     

    Best regards,

     

  • PaulVZ Profile Picture
    4 on at

    Hi iiBZy,

     

    Thank you, for your idea. I have also tried adding this data in a collection to force a update of values but still had to click twice for data to reflect.


    @Anonymous wrote:

    I feel like this is a problem I have encountered, it's not that the datasource isn't refreshing I think it's more to do with the selected.ID not being updated (still storing the old values hence why they don't change) try reselecting the ID from the gallery after the refresh.


     

  • PaulVZ Profile Picture
    4 on at

    Hi v-yutliu-msft,

     

    Thank you, I have created the timer component as you suggested and seems to have done the trick.

     

    If I have to ignore the fact that there will be a data call every couple seconds and ignore that there will be a constant call to the DB I would be happy to accept that this is my life now.

     

    it works ... is it pritty ...  heck no ... I feel I need a shower now 😉

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard