People SharePoint Type inserting numbers in database

Jul 6, 2009 at 7:35 PM
Edited Jul 6, 2009 at 7:39 PM

Hi,

I ran into an issue when I create a column in a list of the SharePoint type People and the list containing that column is imported into SLAM, SLAM seems to add number;# infront of the person's name. I understand that this is the number is the row number from the source that is populating the people column. Is there anyway to filter that out before it is inserted into the database?

The reason for this request is that I am creating a report and one of the columns I am reporting on will have multiple people in one column. In order to remove all the numbers/special characters will require a bit of programming to remove all it. I didn't know if SLAM had a simpler way.

 

Thanks,

Will

Developer
Jul 6, 2009 at 7:42 PM

Will,

The Value of a Person field is actually a sort of lookup field, so the text value has the same format.  You can actually treat a Person field as an association by doing something like:

<Field Name="Person" SPType="Person" AssociatedList="Users" AssociationName="SomeUserAssociation"></Field>

And you can slam the Person content type as well like

    <ContentType Name="Person" TableName="Users" ActivationOrder="1">
        <Fields>
            <Field Name="Account" Column="UserName" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
            <Field Name="Title" Column="Name" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
            <Field Name="E-Mail" Column="Email" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
      </Fields>
    </ContentType>

Still, I think it might be reasonable for SLAM to treat lookup field values as only the value part, such that if you want only to slam a lookup as text (such as the ModifiedBy or CreatedBy field) only the name would appear in the table as you suggest.  To this end however I would be interested to know whether anyone slams lookup fields in this manner with the expectation that the ID is present for parsing.

-Brian