Trigger location tracking at a specific time in the form

Hello everyone,

I need to put an audit function in my xlsform in order to track the user's location during the sampling event. However, the sampling event will occur during a great period of time (around 8 hours), and, probably, the user will open the form before the beginning of the sampling, in order to insert the basic information previously. Considering this, I don't want the location being triggered right in the beginning of the form, but otherwise at a specific moment (for example: when the user answer a specific question, the audit is triggered).

Is there any possibility to insert a trigger for this location tracking?

1 Like

Location tracking would surely come in the form of a question. Questions are programmed in a sequence, which you need to tell beforehand. I don't think you can randomly trigger location question based on the time. They can only be cascaded behind any specific question.

Having said that, you may program a clever questionnaire which keeps moving the user here and there, and then trigger location question through some specific jump logic combination. But it's just an idea, and is overly complex.


Hi @ricardonfc,
Just brainstorming here with you, as I think it's an interesting question.

If you want to capture GPS through the audit function, you can set the time lapse in between when the form will capture the location. However, I don't believe you can specifically set the audit log to capture GPS using a specific question as a trigger.

But, is it something that you can simply add a GPS question to the form, which could be taken by the user right before or right after the sample? You could add a timestamp question that uses once() to capture the timestamp of when the sample is taken and take a second timestamp using once() to capture when the GPS is taken - that way you have a good record that the GPS and sample were taken at very similar times (similar to what an audit log might give you?)

Happy if someone else has another workaround, just adding to the brainstorm :slight_smile:

1 Like

With location tracking turned on for the form audit log, you could look for any locations recorded after certain questions are answered. I'm not sure if using the audit log and turning on location tracking for a form that you expect the user to have open for 8 hours will result in a log that is very long and difficult to parse. Is it just one question and you need the exact location of that one question? If they are going to be in the location for a little bit of time I would think that the audit log would capture that location (or one not very distant).

1 Like