1

I have a list. For this list I have created a custom view showing 4 columns:

ID
Title
Created
Modified

I have added this list in a page and I want to be able to pass ID of item as query string and then this list should display only that item only. Is it possible?

For e.g. if I open Pages/MyListPage.aspx?ItemID=4 then it should show only item 4 on that page.

  • 2010 or 2013? In at least 2010 you can use ?FilterField1=ID&FilterValue1=4 if I remember correctly – Robert Lindgren Jul 17 '13 at 9:31
  • 2013. I tried to set filter as [PageQueryString:ItemID] which actually works in CQWP but it is not working when I do it in list view. – Frank Martin Jul 17 '13 at 10:03
  • Yeah, I have spotted that behavior in 2013 as well. – Robert Lindgren Jul 17 '13 at 10:15
  • But the list filtering as in my first comment above works for me in 2013 too, – Robert Lindgren Jul 17 '13 at 10:17
1

If you edit the page in SPD you can create a parameter on the view defining a query string parameter as the source. You then filter the list against this parameter and it will work as you have stated.

  • Are you referring to Data View web part? I added one in my page but couldn't apply Filter as every icon is disabled in the toolbar in SPD. I can't even define data source as it is disabled too. – Frank Martin Jul 18 '13 at 7:18
  • That or a List View web part. The ribbon is context sensitive so you need to select the web part for the appropriate buttons to be available. If they are still disabled then you could try editing in advanced mode or check your permissions? – Dave Paylor Jul 18 '13 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.