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 News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,610)