# Location Extension/ ClockIn-ClockOff app

**URL:** <https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267>\
**Category:** Questions about Thunkable X\
**Created:** [November 20, 2018, 1:22pm UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267 "2018-11-20T13:22:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian1](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Adrian1](https://community.thunkable.com/u/Adrian1)\
**Post date:** [November 20, 2018, 1:22pm UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/1 "2018-11-20T13:22:41Z")

</div>

Hi all,

New guy here 🙂 ; I’m looking into creating an app that replaces the keycards for ClockIn and ClockOff.  
For example when I get to work ( specific location), my phone automatically detects that and clocks me in…also when I leave the location I’ll be clocked off; and all this information is stored and sent to my manager.  
Can this be done? any input is appreciated.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Adrian1](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Adrian1](https://community.thunkable.com/u/Adrian1)\
**Post date:** [December 3, 2018, 5:32pm UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/2 "2018-12-03T17:32:44Z")

</div>

I managed to set up the location feature; now I would like to move forward and compare the user location with the office location. And if the same than the user is clocked In.  
Anyone please…

---

<div class="post-metadata">

**Author:** ![Taifun](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/taifun/32/1547_2.png) [@Taifun](https://community.thunkable.com/u/Taifun)\
**Post date:** [December 4, 2018, 2:30am UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/3 "2018-12-04T02:30:31Z")

</div>

> [@Adrian1](#):
>
> now I would like to move forward and compare the user location with the office location. And if the same than the user is clocked In.

do a search for **ring fence** , see also these threads in the App Inventor forum  
[https://groups.google.com/forum/#!searchin/mitappinventortest/ring$20fence|sort:date](https://groups.google.com/forum/#!searchin/mitappinventortest/ring%2420fence%7Csort:date)  
Taifun

---

<div class="post-metadata">

**Author:** ![Adrian1](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Adrian1](https://community.thunkable.com/u/Adrian1)\
**Post date:** [December 5, 2018, 4:21pm UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/4 "2018-12-05T16:21:03Z")

</div>

Thank you so much for this piece of information, exactly what I’m looking for.  
I tried to apply everything I understood and got the below code which doesn’t seem to be working- please help someone please…

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/7/b7ee7123b62d29f98f68648b36b8c26648357716.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/7/b7ee7123b62d29f98f68648b36b8c26648357716.png)

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Adrian1](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Adrian1](https://community.thunkable.com/u/Adrian1)\
**Post date:** [December 10, 2018, 1:38pm UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/5 "2018-12-10T13:38:24Z")

</div>

I would really appreciate if someone would take a look over the code above and provide assistance/guidance.

thanks in advance

---

<div class="post-metadata">

**Author:** ![Adrian1](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Adrian1](https://community.thunkable.com/u/Adrian1)\
**Post date:** [December 11, 2018, 7:28am UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/6 "2018-12-11T07:28:47Z")

</div>

After having read the info you provided-thanks-, I got to this point:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/7/b7ee7123b62d29f98f68648b36b8c26648357716.png) [http://community.thunkable.com/uploads/thunkable1/original/3X/b/7/b7ee7123b62d29f98f68648b36b8c26648357716.png](http://community.thunkable.com/uploads/thunkable1/original/3X/b/7/b7ee7123b62d29f98f68648b36b8c26648357716.png)

still, the code isn’t working. where did I go wrong?

---

<div class="post-metadata">

**Author:** ![Taifun](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/taifun/32/1547_2.png) [@Taifun](https://community.thunkable.com/u/Taifun)\
**Post date:** [December 11, 2018, 5:12pm UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/7 "2018-12-11T17:12:52Z")

</div>

it seems to be, you are using Thunkable X…  
I changed the category for you…

Taifun

---

<div class="post-metadata">

**Author:** ![Reed](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Reed](https://community.thunkable.com/u/Reed)\
**Post date:** [December 14, 2018, 6:02am UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/8 "2018-12-14T06:02:51Z")

</div>

I don’t quit follow the goal of the if/else. You want to see  
if ( lat and long are at the office )  
do:  
set atTheOffice to true  
navigate to screen 2  
else:  
set atTheOffice to false  
and just sit idle

Right now your logic is only going to set “atTheOffice” to true if you are in the lat long specified, or set it to false if you are not. you will never get to the “Navigate to screen 2” command. (unless something happens on another screen that can set "atTheOffice to true.

the most straight forward way would have one huge if line but would look like:  
if ( (lat \> 46.760082 and lat \< 46… ) and (long \> 23… and long \< 23…) )  
do {  
set atTheOffice to true  
navigate to screen2  
}  
else  
set atTheOffice to false

its usually a good idea to do an error condition:

if error  
do: set labelx text to error  
elseif ( (lat \> 46.760082 and lat \< 46… ) and (long \> 23… and long \< 23…) )  
do {  
set atTheOffice to true  
navigate to screen2  
}  
else  
set atTheOffice to false

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:52am UTC](https://community.thunkable.com/t/location-extension-clockin-clockoff-app/57267/9 "2024-11-08T11:52:22Z")

</div>


