SharePoint – Pass a Parameter as FILTER value to a Web Part

Click on the relevant Web Part -> Right Side -> Click on Hyperlink

Keep in mind EACH WebPart has a separate Data Source Field, Filter and Sort Settings !

clip_image002

clip_image004

First Create a New Parameter value based on a Query String Variable.

clip_image006

Next set the DVWP Filter settings

clip_image008

The result is that the data in DVWP will be filtered on load, by the Query String variable.

Second Example is to Filter a DVWP based on a Field value.

Based on the Query String Parameter you can filter the detail list web part for the items added.

clip_image002[1]

It will look like this. There is some garbage appearing on top of the DVWP ?

clip_image002[3]

Solution :

Just open the Form again in SP Designer and comment out that section to get rid of it.

<!--    
<tr>
    <td width="25%" class="ms-vb">
    <b>File Type:</b>
   </td>
.....
 <xsl:value-of select="@HTML_x0020_File_x0020_Type.File_x0020_Type.mapico"/>
    </td>
</tr>     

-->

Look in the code for <!—…. –>

Filtering is quite handy !

Advertisements

2 Responses to SharePoint – Pass a Parameter as FILTER value to a Web Part

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: