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.

4
  • 2010 or 2013? In at least 2010 you can use ?FilterField1=ID&FilterValue1=4 if I remember correctly Commented Jul 17, 2013 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. Commented Jul 17, 2013 at 10:03
  • Yeah, I have spotted that behavior in 2013 as well. Commented Jul 17, 2013 at 10:15
  • But the list filtering as in my first comment above works for me in 2013 too, Commented Jul 17, 2013 at 10:17

1 Answer 1

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.

2
  • 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. Commented Jul 18, 2013 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? Commented Jul 18, 2013 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.