cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
slong
Frequent Visitor

Refreshing PowerApp from REST API Custom Connector

So I've written PowerApp with a Gallery component on the homepage which uses the result of a REST API call (to Jira) to populate itself.

 

I've defined a Custom Connector to do the REST API call. My connector is called JiraCloudConnector and has an action called GetStakeholderFeedback defined within it.

 

So, the Items parameter of my gallery component look like this. 

JiraCloudConnector .GetStakeholderFeedback("(project = SERVICES OR project = PAScal AND labels in (ForServicesBoard)) AND issuetype in (Feedback) ORDER BY Rank ASC").issues

 

My question is how do I get the gallery to refresh its items periodically (say every minute) ? Can I use a dataflow to do this ? I don't see any option in a Dataflow to do this.

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @slong 


The way to do this is, rather than set the items property of your gallery control directly to the return value of your custom connector, you would call the ClearCollect function to populate a collection.

 

You would then set the items property of your gallery control to this collection.

Finally, you would add a timer control to refresh the collection every 60 seconds.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-timer

 

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/working-with-data-sources#collections

 

 

View solution in original post

2 REPLIES 2
timl
Super User
Super User

Hi @slong 


The way to do this is, rather than set the items property of your gallery control directly to the return value of your custom connector, you would call the ClearCollect function to populate a collection.

 

You would then set the items property of your gallery control to this collection.

Finally, you would add a timer control to refresh the collection every 60 seconds.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-timer

 

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/working-with-data-sources#collections

 

 

slong
Frequent Visitor

Worked a treat. Thank you 👍

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,103)