cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Getting PowerApps Status info in your apps! Solution

I cant find where I asked this before, but I was told there was not a way to do it.  Well, thats just a challenge to find a way!  

 

I was looking for a way to get the PowerApps/Flow status messages to be in PA, and to give the user some quick access or even some indication of any issues with the system.  Well, I found a way.  It involves Flow.  

 

Scenario:  Get the status contents of https://powerapps.microsoft.com/en-us/support/ into PowerApps, and drive some indicators for the user.

 

image.png

Then, with the text in Powerapps, the HTML can be parsed into the parts that matter.

 

This statement gleans just the text related to the status of the system:

 

PlainText(Mid(GetPAStatus.pastatushtml,
Find("PowerApps Support",(GetPAStatus.pastatushtml))+17,
Find("Search for support",GetPAStatus.pastatushtml)-Find("PowerApps Support",(GetPAStatus.pastatushtml))-18-17)
)

 

The above statement makes this web page:

 

image.png

 

Into this, which is in my app:

 

image.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Getting PowerApps Status info in your apps! Solution

I prettied this up a little, and got the Flow side going.

 

Output now looks like this:

 

image.png

 

Flow side looks like this:

 

image.png

Powerapps expression:

 

Substring(

body('HTTP_-_PowerApps_Status'), lastindexof(first(split(body('HTTP_-_PowerApps_Status'),'support-status"')),'</div>'), Sub(add(length(first(split(body('HTTP_-_PowerApps_Status'),'support-status"'))),add(indexof(last(split(body('HTTP_-_PowerApps_Status'),'support-status"')),'</section>'),25)), lastindexof(first(split(body('HTTP_-_PowerApps_Status'),'support-status"')),'</div>') ) )

 

Flow Expression:

Substring(

body('HTTP_-_Flow_Status'), lastindexof(first(split(body('HTTP_-_Flow_Status'),'context-support-status"')),'</div>'), Sub( add(length(first(split(body('HTTP_-_Flow_Status'),'context-support-status"'))),add(indexof(last(split(body('HTTP_-_Flow_Status'),'context-support-status"')),'</section>'),33)), lastindexof(first(split(body('HTTP_-_Flow_Status'),'context-support-status"')),'</div>') ) )

Powerapps side:

 

This is an HTMLText object, HtmlText control:

"<b/><font size=5>Powerapps Support Status:</b><p>"&
"<font size=3>"&GetPAStatus.pastatushtml&

"<p><b/><font size=5>Microsoft Flow Support Status:</b>"&
"<font size=3>"&GetPAStatus.flowstatushtml

 

 

 

View solution in original post

Super User
Super User

Re: Getting PowerApps Status info in your apps! Solution

Sometimes, I cant stop myself.  I have added getting the date from the flow statement, in order to trigger a flashy thing in my powerapp when there is an update "Today()".  I added this to the bottom of the flow:

 

image.png

 

Then in the powerapps side:

In a Label.Text, I entered this to get a date object:

 

DateValue(Text(DateValue(GetPAStatus.flowdate),"[$-en-US]m/dd/yyyy"))

You can then use that in some date function to trigger actions in your app.  For me, I made a flashy label to blink when there is a update to the status in the same day.

 

For copy pasters, the statement in the FlowDate variable:

 

substring(variables('FlowStatus_Text'),

      add(indexof(variables('FlowStatus_Text'),'updated:'),9),
      sub(add(lastIndexOf(variables('FlowStatus_Text'),'UTC'),3),
          add(indexof(variables('FlowStatus_Text'),'updated:'),9)
         )
)

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Getting PowerApps Status info in your apps! Solution

This is a really excellent solution and I'm sure it'll be useful to many. Thanks for sharing this @martinav!

Super User
Super User

Re: Getting PowerApps Status info in your apps! Solution

@timl ,

 

Thanks for your vote of support.  Its a pleasure to share things like this.  These forums have been the BEST thing that took me from nothing to making very complex and amazing apps in the timespan of a year.  A credit to this forum for sure!

Super User
Super User

Re: Getting PowerApps Status info in your apps! Solution

I prettied this up a little, and got the Flow side going.

 

Output now looks like this:

 

image.png

 

Flow side looks like this:

 

image.png

Powerapps expression:

 

Substring(

body('HTTP_-_PowerApps_Status'), lastindexof(first(split(body('HTTP_-_PowerApps_Status'),'support-status"')),'</div>'), Sub(add(length(first(split(body('HTTP_-_PowerApps_Status'),'support-status"'))),add(indexof(last(split(body('HTTP_-_PowerApps_Status'),'support-status"')),'</section>'),25)), lastindexof(first(split(body('HTTP_-_PowerApps_Status'),'support-status"')),'</div>') ) )

 

Flow Expression:

Substring(

body('HTTP_-_Flow_Status'), lastindexof(first(split(body('HTTP_-_Flow_Status'),'context-support-status"')),'</div>'), Sub( add(length(first(split(body('HTTP_-_Flow_Status'),'context-support-status"'))),add(indexof(last(split(body('HTTP_-_Flow_Status'),'context-support-status"')),'</section>'),33)), lastindexof(first(split(body('HTTP_-_Flow_Status'),'context-support-status"')),'</div>') ) )

Powerapps side:

 

This is an HTMLText object, HtmlText control:

"<b/><font size=5>Powerapps Support Status:</b><p>"&
"<font size=3>"&GetPAStatus.pastatushtml&

"<p><b/><font size=5>Microsoft Flow Support Status:</b>"&
"<font size=3>"&GetPAStatus.flowstatushtml

 

 

 

View solution in original post

Super User
Super User

Re: Getting PowerApps Status info in your apps! Solution

Sometimes, I cant stop myself.  I have added getting the date from the flow statement, in order to trigger a flashy thing in my powerapp when there is an update "Today()".  I added this to the bottom of the flow:

 

image.png

 

Then in the powerapps side:

In a Label.Text, I entered this to get a date object:

 

DateValue(Text(DateValue(GetPAStatus.flowdate),"[$-en-US]m/dd/yyyy"))

You can then use that in some date function to trigger actions in your app.  For me, I made a flashy label to blink when there is a update to the status in the same day.

 

For copy pasters, the statement in the FlowDate variable:

 

substring(variables('FlowStatus_Text'),

      add(indexof(variables('FlowStatus_Text'),'updated:'),9),
      sub(add(lastIndexOf(variables('FlowStatus_Text'),'UTC'),3),
          add(indexof(variables('FlowStatus_Text'),'updated:'),9)
         )
)

View solution in original post

Super User
Super User

Re: Getting PowerApps Status info in your apps! Solution

Pushing data to sharepoint now.  Keeps a nice log of issues.  Still some challenges.  Its about 80% now.

 

image.png

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,752)