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 / Enable button in a geo...
Power Apps
Unanswered

Enable button in a geolocation range

(0) ShareShare
ReportReport
Posted on by
Good morning to everybody.

Please, could you help me with the following query, it is about a case that we would like to solve in the company. We need to control the entry and exit marks of the workers. For this, the ideal would be for them to register through power apps to indicate that they have already arrived at the company, but we would like a button to be enabled when they are within a range close to the company's location. Also, if you are working remotely, this button must be enabled by means of some permission.

I remain attentive to your suggestions.

Have a nice weekend!

Cheers,

Jhonatan Ora Badillo
Categories:
I have the same question (0)
  • AhmedSalih Profile Picture
    6,678 Moderator on at

    @JhonatanOB1993, Hi there, while I don't have a tested solution, but I would start by getting the Longitude and Latitude of the Center of the workplace. Once you have them, set Local variables where you have that button, and use something like the below formula in the DisplayMode property of that button:

    (Note: assuming varWorkPlaceX for Latitude and varWorkPlaceY for Longitude)

     

    If(Abs(Location.Latitude)/Abs(varWorkPlaceX) <= 1 && Abs(Location.Longitude)/Abs(varWorkPlaceY) <= 1, DisplayMode.Edit,DisplayMode.Disabled)

     

    For more information about the Location function: https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/signals#location

     

     

    Regards,
    Ahmed
    If my reply helped you, please give a 👍. And if it has solved your issue, please consider Accept it as the Solution to help other members in the community find it more.

  • JhonaOB365 Profile Picture
    on at

    Thanks for your answer, @AhmedSalih

     

    I'll try do it.

     

    Regards,

     

    Jhonatan Ora Badillo

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard