Can QuickBase receive & display location information from a Field Tech's phone? | Discussions

Expand all | Collapse all

Can QuickBase receive & display location information from a Field Tech's phone?

  • 1.  Can QuickBase receive & display location information from a Field Tech's phone?

    Posted 02-04-2016 02:42

    A HVAC office wants to be able to view the location of their Field Techs on a Google Map within QuickBase so that they can dispatch the Tech closest to the customer?s location.

    The Tech?s all carry company issued Verizon phones, so would it be possible for the phones to periodically send out a message with their location information to a destination that can be read by QuickBase?s new connected tables?

    If the phones can?t do this, is anyone aware of a GPS device that?s stored in the service truck that can send out the location info?



  • 2.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Top
    Contributor
    Posted 02-04-2016 10:57
    Yes that is possible if you have a browser on the phone that can access QuickBase and you don't need any special services including connected tables . Quite frankly the more "services" and external components you add to QuickBase the more complicated you are making the solution. Just do everything in script.

    This demo locates the ten closest White Castle stores to the searcher's present location (your problem is very similar technically):

    White Castle ~ Cravers & Sliders
    https://haversineconsulting.quickbase.com/db/bi5963543

    Just add a new Search and permit your location to be shared, save the record and a list of the ten closest (as the crow flies) White Castle emporiums will be displayed:

    White Castle ~ Cravers & Sliders ~ New Search
    https://haversineconsulting.quickbase.com/db/bkkxm2a9w?a=nwr

    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=485

    I created this app so that no matter where I am after hard day of QuickBasing I can find my nearest White Castle.

    Notes

    (1) There are no approximations involved in the distance calculations. The trig functions are calculated Client-Side using JavaScript because QuickBase does not have trig functions in their formula language. The essential formula for these calculations is the Haversine function which calculates the great circle distance between two points specified by latitude and longitude (yes that is what my business is named after Haversine - a exotic trig function). Here is a technical reference with code I used.

    Calculate distance, bearing and more between Latitude/Longitude points
    http://www.movable-type.co.uk/scripts/latlong.html

    (2) I took a lot of shortcuts and packaged the demo in this fashion specifically to not involve any external services and for other reasons related to being able to maintain a working demo over time. A production implementation would probably have other requirements that could easily be accommodated.

    (3) Great Longitude movie:

    Longitude FULL MOV_E 2000 UK
    https://www.youtube.com/watch?v=LHvt48S9l4w


  • 3.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Top
    Contributor
    Posted 02-04-2016 11:58
    For the user that entered lat/lon in Camberley, Surrey, UK (Sandhurst) and got this result for New York White Castle locations:

    https://haversineconsulting.quickbase.com/db/bkkxm2a9w?a=dr&rid=25

    Please note that I only had US based White Castle locations in my database.


  • 4.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Top
    Contributor
    Posted 02-04-2016 16:03
    Dan,  thanks for the quick reply.  I'll look this over right away.  
    Jim
    P.S.  I liked the Alice Cooper video better.


  • 5.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Posted 02-08-2016 03:44
    Is there a way this code can be modified return the street address, city, state and zip code in addition to the Lat & Longitude?

    jQuery(document).ready(function getLocation()
      {
      if (navigator.geolocation)
        {
        navigator.geolocation.getCurrentPosition(showPosition);
        }
      
    var test = $.ajax({url: url,async:false,success: pushResult}).responseText;
       return false;
    });

    function showPosition(position){

          var editURL = "";
          editURL = "bkkzi23nv";
          editURL += "?act=API_EditRecord&key=" + QBU_recid;
          editURL += "&_fid_7=" + position.coords.latitude;
          editURL += "&_fid_8=" + position.coords.longitude;

          $.ajax({url: editURL,async:false});

          location.reload(true);
     }


  • 6.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Top
    Contributor
    Posted 02-08-2016 15:18
    > Is there a way this code can be modified return the street address, city, state and zip code in addition to the Lat & Longitude?

    You need to use a "reverse geocoding" service. Google has one. I geocoded QuickBase's HQ address and put the lat/lon into the reverse geocode service as follows:

    150 Cambridge Park Dr, Cambridge, MA 02140, USA


    42.3944341,-71.1461022


    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=490


    JSON Response
    http://pastie.org/10713624


  • 7.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Posted 02-25-2016 19:48
    Dan, will this work in the mobile view of quickbase?


  • 8.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Top
    Contributor
    Posted 02-25-2016 21:01
    The code will work but you are going to have to address some issues that are unique to working within QuickBase's mobile layout.  I know for instance that to get the image onload technique to work on mobile you have to use a slightly different module.js file to detect the appropriate URLs used with mobile.


  • 9.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Posted 02-25-2016 22:29
    I guess for now i'll leave it at the full version. Can this be used to return a single value to the same record where the search was performed, instead of generating a list of results? I'm trying to replicate this but once the current location is obtained the key field of the closest store is brought to a field in the search. Sadly my JS skills are nowhere near what I need for this...


  • 10.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Top
    Contributor
    Posted 02-25-2016 22:40
    Yes it can. Sometimes I have to create the demo so that it would emphasize some feature to all users or to insure the demo will survive into the future without maintenance. I can't remember why I constructed it as it is but I am sure I had a good reason at the time.

    If you need specific help feel free to contact me off world using the information in my profile.


  • 11.  RE: Can QuickBase receive & display location information from a Field Tech's phone?

    Posted 03-07-2018 23:08
    Is this app still accessible? It asks me to login every time.