Added get field value helper function