Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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.




Accepted Solutions

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,


Not it all works like a charm.



View solution in original post

Power Apps
Power Apps



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:


Good luck



Frequent Visitor

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.



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


Frequent Visitor

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.







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,


Not it all works like a charm.



View solution in original post

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (45,991)