function bp_custom_get_member_list_xprofile_data( $field ) {
global $site_members_template;
return xprofile_get_field_data( $field, $site_members_template->member->id );
}
function custom_position (){
if ( $position = bp_custom_get_member_list_xprofile_data('Position') ) :
echo $position;
endif;
if ($position == 'Actor') :
echo '2';
else :
echo '1';
endif;
}