My setup is as follows: A custom page on a Sharepoint 2010 site with a list view web part and a Data view web part. When I select an item in the LVWP I want to filter the DVWP with a multi lookup field value. So I've connected to two web parts such that the DVWP gets the parameter from the LVWP. I filter the DVWP with the following:
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[contains($pDataAftaleID,concat(@ID,';#',@ID))]"/>
where pDataAftaleID is the parameter from the LVWP.
My problem is: Everything works well if the selected item from the LVWP has a value in the parameter field, but if it doesn't, Sharepoint doesn't seem to write the null/empty or zero value to the parameter and the filter parameter keeps the value from the last selected item in the LVWP with a value, and the DVWP therefore shows the items from some previous selected item and not "no items to show".
Is there some way to force the writing of the empty field, or is it possible to set the parameter to zero each time the DVWP loads? Any suggestions?