get the value of a field pointed by a foreign key

I think you need to look into Associations, which manage the table relationships in your models.