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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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