Views:

Applies to Product - Power Apps

What’s happening?
Customers are experiencing intermittent errors related to latitude and longitude validation in custom pages of a model-driven app. The errors occur when users attempt to submit data after capturing their location, even when they are in the same location or beyond the expected distance threshold.
 

Reason:
This may be related to the custom code implemented for location validation, specifically using the Haversine formula for distance calculation. The formula is designed to validate the captured location against a predefined distance threshold, but it appears to malfunction under certain conditions, leading to errors for some users.
 

Resolution:

  • Users have reported that this can sometimes be resolved by:
    • Restarting the PowerApps mobile application.
    • Restarting the device.
    • Turning off and then turning on the location services on their devices.
  • It is recommended to check the following:
    • Ensure that the PowerApps application has the necessary location permissions enabled.
    • Verify that the device's battery optimization settings are not restricting GPS access.
    • Confirm that users are in an area with good network coverage to ensure accurate GPS functionality.
  • If the issue persists, further investigation into the custom code may be required, and users should consult their internal development team for assistance with debugging the custom logic.