cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
gcanelon
Level: Powered On

Keeping track of a medic location in a combat zone

Hello. We have created an app for rescue teams (civilians) who are working as first responders in zones of disaster, urban conflict, or urban combat (the latter is the current use). Basically they enter the type of wound being treated, id the patient, provide a triage level and then submit this information along with the latitude and longitud wich is captured automatically by the app. This information lands in our database from where we plot the location of the patient and refer them to the safest staging area or treatment facility.

 

Our medics in the field and their controllers are asking us for a way to track their location without the need to manually create an entry in the app. We would like to have an update every 10-15 minutes or so. This would allow us to coordinate the location of the different teams and keep them away from trouble areas.

 

Any help with this will be greatly appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
gcanelon
Level: Powered On

Re: Keeping track of a medic location in a combat zone

So, I was finally able to identify the reason why the solution Rezza suggested was not working. For those interested visit this post by audrieg, https://powerusers.microsoft.com/t5/PowerApps-Forum/Patch-Function-Not-Submitting-to-SharePoint-Onli...

 

Not it all works like a charm.

 

Thanks.

5 REPLIES 5
PowerApps Staff Reza
PowerApps Staff

Re: Keeping track of a medic location in a combat zone

Hi,

 

There is a timer control that you can leverage. However, please note currently we DO NOT have anyway to run apps in the background. As a result, even if you use timer, when you close or suspend the app, you won't get any update. I will do some research to see if there is any other way for you to do this.

 

 

Timer control:  https://powerapps.microsoft.com/en-us/tutorials/control-timer/

 

Good luck

Reza

 

gcanelon
Level: Powered On

Re: Keeping track of a medic location in a combat zone

Thanks Reza. We tried using your solution but the fact that the app can't run in the background, like you well said, is an important limitation that limits its usability. 

 

So we have analized the situation and the next best thing is to create a "Home Screen" for the app, where the user can, by only clicking a button submit their latitude, longitude and user full name to a Sharepoint list. Since the form fields can capture User().FullName, Location.Latitute and Location.Longitude, data entry would not be needed, only data submittion. 

 

We don't seem to find the right way to do it however. I have included a screen shot of the home screen. The first three buttons allow the rescuer to create a patient report once they are in the CCP (Casualty Care Point), away from danger. The last one, is intended to allow our guys to just press the button and send their location. Since this action may need to be done in a danger zone we want them to do it in the minumum time possible and without having to go to other screens.  Any suggestions from you or the community, on how to achieve this will be greatly appreciated.  Thanks in advance.

 

Screen.PNG

PowerApps Staff Reza
PowerApps Staff

Re: Keeping track of a medic location in a combat zone

Assume I create a sharepoint List called "Location App" and it has three columns, long, lat (both type number) and username (type string)

 

You can import the list in your app, and on the onSelect of your button, write an expression like this:

 

Collect('Location App', { username: User().FullName, lat: Location.Latitude, long: Location.Longitude})

 

This will add a row with the information that you need. Please note that SharePoint is probably not the best choice for your use case. SharePoint works fine if number of rows are around 2k-5k. As your application grow, you either have to delete some of the rows, or move to solutions that are better with large data. For example Commoon Data Service connector, or SQL server if you have any available.

 

I hope it helps

Good luck

 

gcanelon
Level: Powered On

Re: Keeping track of a medic location in a combat zone

Dear Reza, thanks for your reply. I think I am doing something wrong here. I have attached two screen shots for you to see.

 

The first one shows you the initial screen the users see. It has no forms just the buttons and one of them is the one in question. You can see there that I have added the sources, for the app. The first source is the list that contains the three fields, namely: Nombre, Latitud and Longitud.

 

The second screen shot shows you the screen with the button "Update your Location" selected, so you see the use of the formula you provided. I see no errors, but when I preview the form and click the button no record is added to Sharepoint.

 

I also find curious that when I enter the first parameter of the Collect function intelisense provides me with valid options (the sources). But when I start writing the other parameters { Nombre: User().FullName, Latitud: Location.Latitude, Longitud: Location.Longitude}) intelisense doesn't provide valid options to select from.

 

Please advise.

 

Thanks in advance.

 

 

 

Capture.PNGCapture1.PNG

 

 

gcanelon
Level: Powered On

Re: Keeping track of a medic location in a combat zone

So, I was finally able to identify the reason why the solution Rezza suggested was not working. For those interested visit this post by audrieg, https://powerusers.microsoft.com/t5/PowerApps-Forum/Patch-Function-Not-Submitting-to-SharePoint-Onli...

 

Not it all works like a charm.

 

Thanks.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 475 members 4,593 guests
Please welcome our newest community members: