Share via


how to get list item value of specific page in data view web part.

Question

Wednesday, June 19, 2013 7:39 PM

I created a site column "xyz" in a page library. So when i create a page i am adding values to xyz site column while creating a page. i want to display the values which i added to the respective page on a data view web part.

I was able to pull all the values from xyz site column and display on the data view web part but my requirement is to pull only the values i added of the respective page. what to add in the filter to get page specific values in data view web part.

Thanks,

M.M

All replies (4)

Thursday, June 20, 2013 7:51 AM ✅Answered

Hi,

I understand that you want to add a data view web part on a site page to display the value from xyz column. Here are two ways to achieve this:

  • Use a data view web part.
    1. Edit the Site Pages library in SharePoint designer. Change the hyperlink for the Name column to contain the page name in the URL as a query string.
    2. Then you can add a parameter for the data view web part. Set the parameter source to query string.
    3. You can use this parameter to filter the data view web part to show only current page in the data view web part.
  • Use a content query web part.
    1. Set the content query web part to display data from the Site pages library.
    2. Add an additional filter for the content query web part like this Name is equal to [PageFieldValue:Name]
    3. Then set the Title under Fields to display to xyz[Custom Columns].(change custom columns to your group name where the xyz column is stored).

Thanks,

Entan Ming

Entan Ming
TechNet Community Support


Thursday, June 20, 2013 8:02 AM ✅Answered

Hi,

1) when you come to this page pass the page id / title as a query string parameter

2) In the value field select the last option of create new parameter, and create a query paramter. You have other options as well



3) now have this parameter in the value.

let me know if you need any more info

Thanks Santhosh V


Wednesday, June 19, 2013 8:47 PM

Filter the data view webpart based on the page title.

Or Page is located in the library as an item. You can even pass the current item id and filter your data view webpart, which should be handy.

Thanks Santhosh V


Wednesday, June 19, 2013 9:01 PM



This is the Filter Criteria. I selected Field Name as Title and what should i select for Value ?? i need pull only the values i added to a site column in a page library for the respective page.

Thanks,

M.M