I would like my app to use a table (attached ...

(Bonnie Muir) #1

I would like my app to use a table (attached sheet) to enter distances between schools.

I cannot use lat long because the school district has set miles that we have to use, even though they are not the exact distances.

Does anybody have an idea how I could achieve this?

(Jon Simmons) #2

Hey Bonnie,

Since we can’t use LatLong it means that the info given to you by the district needs to be manually inputed into your app.

One way that i can see that working is by creating a junction table where you would have to marry up each school to one another and input the distance between them.

From there you would be able to refer to that table as and when it’s needed.

Hope this helps

(Aleksi Alkio) #3

I believe the easiest solution is if you reconstruct your table a little… create a table with three columns… Start, End and Distance columns. First two rows would look like…

ASB > DO > 3 ASB > Bastian > 10 Then you can read the correct record with a formula as… ANY(SELECT(Table[Distance],AND([Start]=[_THISROW].[Start],[End]=[_THISROW].[End])))

(Bonnie Muir) #4

@Jon_Simmons I will give that a try.

Although I am unfamiliar with a junction table, I will look into it.

I really appreciate your quick reply.

Thank you.

(Bonnie Muir) #5

@Aleksi_Alkio I appreciate your reply.

I will try that formula.

I am appreciative of your idea.

Thank you.

(Bonnie Muir) #6

@Aleksi_Alkio Would you be willing to look at my app and help me?

I tried the formula you suggested and am making some progress, but app is still not working correctly.

If you could help, I attached a link to this post.

Thank you. AppSheet appsheet.com

(Aleksi Alkio) #7

What is your account ID and app / table name? No link is needed.

(Bonnie Muir) #8

@Aleksi_Alkio My Account ID: 351653.

The app name is Work Mileage.

(Aleksi Alkio) #9

You could add formula into Distance column (number type) as… ANY(SELECT(Mileage[Distance],AND([Start]=[_THISROW].[From],[End]=[_THISROW].[To])))