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

 

 

View solution in original post

slong
Frequent Visitor

Worked a treat. Thank you 👍

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (973)