I am trying to join point data to polylines in ArcMap 10.3.1, for which I have used the Near tool, and that gives me the distance and FIDs of the nearest polylines, and I can then use the FID to join the two datasets. However, I would like to use an additional selection criterion that is recorded in the point data to choose the polyline to link to. That is, the nearest polyline is not necessarily the adequate line to join to, but it might be a polyline that is further away, if it has the matching attribute I am looking for. I added a screenshot of the problem: the yellow point feature needs to be joined to one of the nearby line features, which have different attributes according to their colors. I could of course select the proper line manually, but I have about 5000 points to join, so that's not really efficient... The selection attribute is the line material, which is recorded in both the point and the line features. Can anyone help?