cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thmit
New Member

Pub-Sub in Canvas App - refresh page based on an event

Can the PowerApp receive a notification from a web service (called from an API) and refresh a specific page based on the information received)?

There are multiple ways in theory, but which ones are supported by Powerapps? Polling? Webhhoook? Websocket? MQTT? Make a new custom component with PCF? 

1 ACCEPTED SOLUTION

Accepted Solutions
vrparda
New Member

I did a similar think as PoC work; Power Apps Canvas model app. will be accessed from some users PC's which have a local peripheral devices. Local web socket server streams data to Power App within PCF.

Notifying output properties within a stream solves my requirement.

View solution in original post

9 REPLIES 9
nmk
Resolver I
Resolver I

Which backend system you are talking about? Is it dataverse or any other system. What is that backend system support if that's not a dataverse.

Thmit
New Member

Hi nmk, 

Not Dataverse. It comes froma web service (called from an API)

nmk
Resolver I
Resolver I

So in this case, is this not dependent on what the other systems will provide you. You just need to consume it in the canvas app. I am really not sure if it's possible coz you need to use javascript in order to consume it and the only thing that comes to mind is to use PCF for canvas app. 

Please give it a try.

Thmit
New Member

Thank you, nmk. 

Can we use custom connector on this?

I notice that we cannot access the Trigger request on CanvasApp, but we can use the Trigger in PowerAutomate.

 

Furthermore, is there a roadmap regarding this ?

Thanks!

nmk
Resolver I
Resolver I

Yes, PCF for canvas apps is available. I haven't tried that out yet and it's still in preview.

 

More from the docs site:

https://docs.microsoft.com/en-us/power-platform-release-plan/2019wave2/microsoft-powerapps/component...

I meant CustomConnector not CustomComponent. 

 

We can create CustomConnector(from a certain RESTAPI) and specify the trigger as a webhook. 

However, it is not possible to access this Webhook Trigger in CanvasApp. 

Any thought?

FlorianGrimm
Frequent Visitor

You can use a websocket e.g. SignalR.

What I don't know is how you authenticate against the websocket service.
If you are transport only messages ids that have no meaning .e.g {id =5; action=haschanged}, and then reload the data - it might work for you.

If a pcf control (given the url via parameter) open the websocket and if a event is received calling the notifyOutputChanged() that triggers the reload it might work.

Sorry for all the mights...

 

cu Flori

Hi @Thmit 

I am not sure what are we trying to do here? You mentioned in the original post that you want to refresh the page based on a trigger from some server. e.g. a realtime dashboard. and in my view, it may be only possible via creating a custom pcf component. I don't know what is your server using to send out the notification? is it webhook or something else? 
I think you need to try out the concept and see how it goes







 

 

 

 

vrparda
New Member

I did a similar think as PoC work; Power Apps Canvas model app. will be accessed from some users PC's which have a local peripheral devices. Local web socket server streams data to Power App within PCF.

Notifying output properties within a stream solves my requirement.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,683)