Set Session Value - SharePoint Customization - SharePoint for All - Dell Community

Set Session Value

This question has been answered by kenny.wu-quest

Hi, we need to use a qListView and filter the data it displays using dynamic data from somewhere else (a system outside SharePoint).

We can't use the HttpParameter since the data is very sensitive, so we figured Session is our best alternative (and it could prove to be very useful for further customizations).

But, reading the guides for the QuickApps we couldn't find one that allow us to SET the session value WITHOUT user interaction (if there is, please feel free to point it out), so we thought of settings the session value via code/webpart/whatever.

I'm thinking its just a plain ASP.NET session variable, but don't really know.

Can this be done? Is there a better way to achieve it?

Thanks!

Verified Answer
  • Hi Sebastian,

    Yes, the session in qListView is just a plain ASP.NET session.

    The qListView can consume or pass the session for anther webparts, you want to pass the session value to qListView ftom outside the SharePoint system, right? If yes, I think it is hard to achieve it. Because , the filter criteria must contain the list name. I would like to tell you more about the detail.

    You can set the CAML filter by consuming the session, but you must provide the list name and site url. Let me take an example, if the session value is passed form outside(I mean the data also from SharePoint, but form another list), for example, form the qSelector, qListView will get the list by using the site url and the list name, and the qSelector is not just pass a single value to the qListView, it passed a row of the list item to qListView. So the Source Name is indicate to which column it should use to filter the data.

    That mean, if your application is not use the SharePoint list, it is no way to pass the session to qListView.

     

    Kenny.

All Replies
  • Hi Sebastian,

    Yes, the session in qListView is just a plain ASP.NET session.

    The qListView can consume or pass the session for anther webparts, you want to pass the session value to qListView ftom outside the SharePoint system, right? If yes, I think it is hard to achieve it. Because , the filter criteria must contain the list name. I would like to tell you more about the detail.

    You can set the CAML filter by consuming the session, but you must provide the list name and site url. Let me take an example, if the session value is passed form outside(I mean the data also from SharePoint, but form another list), for example, form the qSelector, qListView will get the list by using the site url and the list name, and the qSelector is not just pass a single value to the qListView, it passed a row of the list item to qListView. So the Source Name is indicate to which column it should use to filter the data.

    That mean, if your application is not use the SharePoint list, it is no way to pass the session to qListView.

     

    Kenny.

  • Kenny, thanks.

    We figured we may not be able to do this (your answer was just the last nail in the coffin), so we're already trying to figure out how to encrypt the desired information in order to use the HttpParameter to filter the qListView

    Thanks again!