Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Accessing a sharepoint list

I have followed instructions from other posts to retrieve data from a sharepoint list and I end up with this in the script

 

LOAD name,
    rs:name,
    rs:number,
    [datatype/dt:type] as dt:type,
    [datatype/dt:maxLength] as dt:maxLength,
    [datatype/dt:lookup] as dt:lookup,
    %Key_xml_98C49F546A18E856    // Key to parent table: xml
FROM [http://sites/Quality/PAT/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=0&RowLimit=0&List={5B31BEE9-1F25-4BA7-9089-E21AF528686B}&View={5A7AFDDC-C79A-46D4-A308-921FA84A832D}] (XmlSimple, Table is [xml/Schema/ElementType/AttributeType]);

row:
LOAD ows_ID,
    ows_Date_x0020_raised,
    ows_Description,
    ows_Source,
    ows_Corrective_x002f_Preventative_x0,
    ows_Responsible_x0020_person,
    ows_Department0,
    ows_Area0,
    ows_QA_x0020_representative,
    ows_Target_x0020_date_x0020_for_x002,
    ows_Status,
    ows_CAPA_x0020_action_x0020_closed_x,
    ows_CAPA_x0020_action_x0020_closed_x0,
    ows_Reference,
    %Key_xml_98C49F546A18E856    // Key to parent table: xml
FROM [http://sites/Quality/PAT/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=0&RowLimit=0&List={5B31BEE9-1F25-4BA7-9089-E21AF528686B}&View={5A7AFDDC-C79A-46D4-A308-921FA84A832D}] (XmlSimple, Table is [xml/data/row]);

xml:
LOAD xmlns:s,
    xmlns:dt,
    xmlns:rs,
    xmlns:z,
    [Schema/id] as id,
    [Schema/ElementType/name] as [ElementType/name],
    [Schema/ElementType/content] as content,
    [Schema/ElementType/rs:CommandTimeout] as rs:CommandTimeout,
    %Key_xml_98C49F546A18E856    // Key for this table: xml
FROM [http://sites/Quality/PAT/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=0&RowLimit=0&List={5B31BEE9-1F25-4BA7-9089-E21AF528686B}&View={5A7AFDDC-C79A-46D4-A308-921FA84A832D}] (XmlSimple, Table is [xml]);
// End of [owssvr.dll?cmd=display&xmldata=0&rowlimit=0&list={5b31bee9-1f25-4ba7-9089-e21af528686b}&view={5a7afddc-c79a-46d4-a308-921fa84a832d}] LOAD statements


but when I try to reload I get this error

Syntax error, missing/misplaced FROM:

AttributeType:

LOAD name,

    rs:name,

    rs:number,

    [datatype/dt:type] as dt:type,

    [datatype/dt:maxLength] as dt:maxLength,

    [datatype/dt:lookup] as dt:lookup,

    %Key_xml_98C49F546A18E856   

FROM [http://sites/Quality/PAT/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=0&RowLimit=0&List={5B31BEE9-1F25-4BA7-9089-E21AF528686B}&View={5A7AFDDC-C79A-46D4-A308-921FA84A832D}] (XmlSimple, Table is [xml/Schema/ElementType/AttributeType])

AttributeType:

LOAD name,

    rs:name,

    rs:number,

    [datatype/dt:type] as dt:type,

    [datatype/dt:maxLength] as dt:maxLength,

    [datatype/dt:lookup] as dt:lookup,

    %Key_xml_98C49F546A18E856   

FROM [http://sites/Quality/PAT/_vti_bin/owssvr.dll?Cmd=Display&XMLDATA=0&RowLimit=0&List={5B31BEE9-1F25-4BA7-9089-E21AF528686B}&View={5A7AFDDC-C79A-46D4-A308-921FA84A832D}] (XmlSimple, Table is [xml/Schema/ElementType/AttributeType])

can anyone help

2 Replies
Not applicable
Author

One of my colleagues helped to resolve this. The issue was that the script by default included lines related to attributes and xml rather than just the xml/row code. deleting the superfluous lines of codes worked. If anyone has this problem and wants me to upload an example of the 'fix' just let me know.

Not applicable
Author

Can you please tell me what code needs to be deleted. Below is what mine looks like..if you can post yours as an example that would be great.