cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PaulVZ
Level: Powered On

Refresh data source only after 2nd click

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

4 REPLIES 4
iiBzY
Level: Powered On

Re: Refresh data source only after 2nd click

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.

Community Support Team
Community Support Team

Re: Refresh data source only after 2nd click

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,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulVZ
Level: Powered On

Re: Refresh data source only after 2nd click

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.


@iiBzY 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
Level: Powered On

Re: Refresh data source only after 2nd click

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 😉

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 (4,516)