GPS Lat/Lon in a Data Field?

Does anyone know if it is possible to get the current LAT/LON inside a data field?

I tried this technique but the docs say only in apps and widgets. There must be a way...

Position.enableLocationEvents(Position.LOCATION_ONE_SHOT, method(:onPosition));