I currently have a layer with milepost locations on a railroad track. I'm creating another layer while driving down the tracks where I need to add comments. There's a field in the comments layer for milepost location and I'd like it to be accurate to two decimals. When digitizing my comments, I'd like it to automatically give me the milepost location. It doesn't have to be exact, if it could just find the two nearest mileposts, determine which of those two was the smaller number, then give me the distance from that milepost added to the milepost number. I'm trying to figure out how to make an expression for a default value that will fill in this field while digitizing, but I can't figure out where in the expressions list you can find a distance from a point in another layer.
I'm driving down the tracks and I'm currently .6 miles from milepost 8 and .4 miles from milepost 9. When I "Add Point", I'd like the Milepost field to default to a value of "8.60."