I was going to suggest building these in AppSheet but I now realize that appsheet does not appear to have Sin() or Cos() or Radian(). So I think you will need to build these directly in your spreadsheet.
Maybe someone here has a better solution to present, also…
AppSheet has DISTANCE(…), which should work to calculate the distance between two LatLongs, at least on a basic level. But as for an example of how to accomplish calculating and then finding the smallest between your two tables, I don’t have one at the moment. I will think about it though.
The query @Steve gave was for Table 2 usage. It seems you applied it to Table 1. So, Yes, you’ll need to adjust the column names to match those found in Table 1.
I believe LatLong types are expected to be numeric pairs (number1,number2). In your case you have the parts separated. So i think you just need to change the type of Lat and the type of Long to be Decimal.
Wow. This works. This is a game changer for my company. Thank you guys VERY much. Last question with this. How can i make it show the Name instead of the id/key?
Ok, so a couple of things. If you are going to store the individual Latitudes and Longitudes, then those columns should be in a decimal format. And for your LatLong column your formula should be just LATLONG([LAT], [LONG]).
You are showing a list of Truck ID’s…correct? I don’t know of a way to have it automatically use the Label for display inn this instance. You want the ID’s to store in the record.
You have a couple of options:
Create a Virtual Column that retrieves the Names for these ID’s and show the VC instead of the actual column.
Change “Closest Truck” to show as an Inline Table - a row for each truck. The advantage is that you can show other Truck info along with the name.