cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Show Live Data on Powerapps Portal

Hi All,

My requirement is-
I am sending an email to specific contacts then the receiver will be having a notification system, so when the receiver receives it then it should notify the user without refreshing the page as shown below image.

Tejasvi_munge_0-1612504709936.png

 

I know we can do something like- insert data into CDS, refresh the page get it display on front page but I don't want that I want it to be Live.
Note: in .net we can use a socket and achieve this. Do we have something like this in powerapps portal? 

How can I achieve that?

 

5 REPLIES 5
justinburch
Microsoft
Microsoft

Hi @Anonymous,

The same way you'd any other implementation, with the caveat it'll need to be client-side (JS): you'd need a Publish-Subscribe model. Ultimately, you need to add JS to your Portal to 'listen' for updates client-side, client-side functionality to show the updates, and a server-side push to these subscribers. I don't personally have experience implementing it, because there's typically complexity there - maybe this Google doc for a subscription API using JavaScript's Notification API could help.

 

A simpler implementation might be your very recommendation of just using records in CDS, but have (perhaps in your header) a small JS timer to query for new 'notifications' every 30s or few minutes or so. Keep in mind that you might still need to think of a way to store if this particular user has already seen this notification, unless it persists for X amount of time or you don't care about it showing on each query/page.

Fubar
Solution Sage
Solution Sage

Be mindful that if you are essentially polling CDS/Dataverse that each poll will be a API request and depending on your users licencing (including if they are Internal vs External users) you may very well find that you exceed the daily API limits.

 

If the API limits are a problem you would probably have to come up with a complicated mechanism such as you have Ajax on your site talking to Azure (probably via the Oauth explicit grant flow functionality), code in azure then polling an Azure Service Bus to check if a new message has arrived (or working with Listener).  And code on the Dataverse side to push to the Azure Service Bus when the update (response/receipt ) occurred in Dataverse. (and there are probably a number of technical challenges and of course additional costs to overcome with something like this also)

 

Wouldn't it be easier to just send the Contact an Email or SMS?

 

Anonymous
Not applicable

Hi @justinburch  ,

I understood that we need to implement it as Publish-Subscribe model but where do we subscribe to on powerApps? For .net we can have a socket open from the backend and listen to it using signalR client library but I'm not seeing any part of powerApps that can emit events and I can subscribe to it from the client.

Hi @Anonymous, I'm not aware of any capability built directly that you could leverage, as my limited experiences involved Azure resources.

Fubar
Solution Sage
Solution Sage

There is no current PowerApps Portal publish/subscribe functionality - and you have to be mindful of the API limits if you are just polling Dataverse/CDS, that is why I suggested what I did as it is a way you could potentially make it work. 

(The one thing you can do is make Entity Lists RSS feeds, but as per the doco this is not secure and should not be used for any thing that should not be publicly available)

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,283)