Convert ForeignID to string