Activate location automatically or required

hi, I’m trying to make an attendance application, is there a way to enable location automatically, or at least required?

Learn how to hack this @agung_taufik1

2 Likes

thanks for the info…
because of the free version, I can’t apply CSS yet

Another way is that you use a custom form with a custom action to control your submit button.

Just curious - what is the purpose of capturing the location upon check in?

because this is an attendance application, I want every employee who comes in to be in the office area…
and I’m developing it, if the employee who comes in is within 1km of the office, that can’t be done

I’ll try…thanks

1 Like

Okay, that’s what I thought.
So I assume you have the coordinates of the Office location?
Assuming yes, add a Distance to Location column that compares the users current location with the Office location. Then you can only allow them to Check in if that distance is less than the threshold that you set, and there is no need to ask for their location in the form. As long as the users allow location sharing when the App is opened, that will work.

1 Like

oh great, thanks for the idea

May I ask again, how do I apply Excel formulas in GT? I wrote today but what appears is numbers

If you just want a column containing the current date, you should use a Math column:

ok thank you very much…
Can this date reference make the visibility of the check in button disappear?
For example, today I was absent from coming in and absent from going home, when I was absent from going home, the button will disappear, and will be available again the next day…

It’s possible, it’s just a matter of clearly defining the rules, and then building the logic.

Questions:

  • do users also Check Out, or do they only Check In?
  • if they also Check Out, do you update the existing (Check in) row, or create a new one?
  1. The user checks out
  2. yes… I updated the existing check in line (row)

Okay.

So if a user Checks in on one day and then forgets to Check out, what should happen on the next day? Do you just forget about the previous day and leave the Check out empty?

Let’s assume yes. I would do something like this…

First, in your Check ins table I would have 3 columns for dates:

  • Check In (Datetime column)
  • Check Out (Datetime column)
  • Date (Number column in the format YYYYMMDD)
  • I also assume you have a column to store the users email address

Now in the table that the Check In/Check Out screen is attached to, create the following columns:

  • Math column to return the current date in YYYYMMDD format:
Year(Now)*10^4
+Month(Now)*10^2
+Day(Now)
  • Query column that targets the Check In table, with the following filters:
    – Email is signed in user
    – Date equals This row->math column
  • Lookup column that fetches the first check out time via the query column
  • Single Value->First->Whole row column via the query column

To decide if a user needs to check in or check out, use an if-then-else column:

  • If Query column is empty, then Check In
  • If Lookup column is empty, then Check Out

When a user Checks In, you will always add a new row.
When a user Checks Out, you will update the existing row via the Single Value column

1 Like

wow great, thanks for the perfect explanation, I’ll try, I’ll ask for your advice again if I encounter any difficulties

Is there a limit to calculating distance in the free package?

I would think it should be fine as long as you are using coordinates. An easy test would be to add more than 10 rows.

3 Likes

Use JavaScript to calculate the distance without being affected by this limitation. However, I’m not sure yet if there are any restrictions when using the location button in the free plan.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.