web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Location tracking in a...
Power Apps
Unanswered

Location tracking in a model-driven form

(0) ShareShare
ReportReport
Posted on by 1,710

Hello,

 

I am building a model-driven app where users will do check-in/out from their mobile devices.

The time entry form has an "Address Field", onLoad or OnSave it does not matter, I need to automatically log his location based on lat/long where he is located.

 

pastedimage1678901657080v1.png

My concerns are the below:

1. Where will the users consent to enable location tracking in the model-driven app? If it is not an option can we still track his location?

2. Shall we use Bing Maps APIs to auto-populate the location and trigger the function on either onLoad or OnSave?

3. Could you please advise the most appropriate practice for such a scenario and provide a simple example?

Any help is greatly appreciated.

Best regards,

Julien

I have the same question (0)
  • Anton_Dali_UKR Profile Picture
    75 on at

    You need to utilize Field Service app. If I am correct you have to purchase additional license. 

    In Field Service module location tracking is out of the box feature which is required administer settings. Here is a link https://learn.microsoft.com/en-us/dynamics365/field-service/mobile-powerapp-location-auditing

     

    However, if you are still heading to track it on your custom table, script would be a solution in this case. JS may be added onSave with auto populating coordinates scenario.

  • EBMRay Profile Picture
    1,710 on at

    Hello @Anton_Dali_UKR ,

    Due to the fact that we don't want to implement the FS module to have this feature, we are building it as a custom one in order to track the employees' locations.

    Best regards,

    Julien

  • Anton_Dali_UKR Profile Picture
    75 on at

    Here is an official example of js code https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-device/getcurrentposition

    Looks pretty simple but required user action to catch coordinates whereas in FS feature works permanently. I assume it doesn't matter in your case. You expect user action anyway. 

    The only opened question for me is how to force turn on location option on user's mobile device. 

  • EBMRay Profile Picture
    1,710 on at

    Hello @Anton_Dali_UKR ,

    Thank you for providing the example.

     

    We're not using the FS module and this why we are implementing this feature.

    I still didn't find a way where you can force to turn on location option on the user's mobile device.

     

    Best regards,
    Julien

  • Anton_Dali_UKR Profile Picture
    75 on at

    That is why I mentioned Field Service where location is captured automatically by mobile app. 

    How they do it - I don't know, but it works there. Perhaps, app do it somehow in hidden mode against user settings.

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Julien2 ,

     

    This may not be much help but you could look at using a Canvas App to capture this information.  This would provide you the most flexibility I would expect to go after the mobile sensor information.  You could have this stored to Dataverse and it might even simplify their user interface for them to capture this data.  Just a thought.

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/how-to/mobile-sensors 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard