Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

loading multiple sharepoint lists

Hey all,

I'm trying to load multiple sharepoint lists with one block of code. My first attempt was to handle this process similar to loading multiple documents using wildcard characters. But the problem is that those only work for document names or extensions and not for directions.


    LOAD ...
               ...

    FROM

    [http://shareroom.xxxxxxxxx/xx/xxxx/MyList_*/Allitems.aspx]

    (html, ...);

So my first question is if I used the wildcard characters wrong or is it even impossible to use this approach?

Apart from this I tried to use a For each next loop to improve my load script. But I face issues with the defined list.

    For each Item in list

        LOAD ....

                   ....
        FROM

        $(Item)

        (html, ...);

    Next Item

Everything works fine if I write the Items instead of the list directly in this block of code. BUT that is very cumbersome, because the list items are links and have a very long character length. So I tried to use a seperate list where I can define my links and just need to use the list in the loop. This worked like that:

    SET vList = 'link1', 'link2';

    For each vItem in $(vList)

        LOAD ....

                   ....
        FROM

        $(vItem)

        (html, ...);

    Next vItem

BUT this only worked when I wrote all the links in a single row! When I used a line break after each "," to make the code more attractive the list stopped working .... So what did I do wrong and/or does anyone see a much easier solution for my kind of problem?

Thanks for any reply!

3 Replies
buzzy996
Master II
Master II

not sure the way ur trying to do it'll work  or not.

but what I did by using ms access as a bridge, created multiple DSN connections for example one dsn connection for one list and tried to define the keys based on unique fields in qv schema,it was worked for me.

Not applicable
Author

thanks for reply. the issue I deal with is that later on people will generate multiple sharepoint lists and QV should automatically load all new generated lists, without the need to adapt anything in the load script. and the question above is just the first step developing such a solution. I probably will go with a loop where I check if some links exist or not and then try to load the lists by linking variables to the connection string. Because I defined a range or possible names for the lists so I can cover this range and should detect all lists .... but let's see ... everything not so easy

buzzy996
Master II
Master II

ya understood..ur absolutely right,it's not much essay..as u know when we load one list from sharepoint list directly we are seeing multiple tables,so some one create different sites in feature..that list will populate multiple tables when u load that list into qv,but qv developer have to do some kind of work manually to map again new site with other existing sites/lists,I believe.