Save select train value in database and use it

Ticket:	#6300