I am using QGIS 3.8 and I have a polyline layer with the attribute below
And a point layer with the attribute below
So I wonder if there is an expression to get the field 'Name' of the point layer of the nearest points to the startpoint and endpoint into the fields 'from' & 'To' of the polyline layer (i.e. the field 'From' will get the nearest point 'Name' to the startpoint and the field 'To' will get the nearest point 'Name' to the endpoint or vice versa) as shown below