DataFormWebPart in SharePoint designer linked to SQL not being able to filterHello,<br> <br><br>I am trying to make a DataFormWebPart in SPD. My webpart gets its data from an SQL table, I tried both through a shared procedure and through just selecting the table I needed.<br><br>I can enable the toolbar to do sorting and grouping as it should, but I've been trying to get the filter in the toolbar to work but this just doesn't want to show as it does when I get data from a sharepoint list.<br>The checkbox to enable filtering (where you can also check &quot;grouping&quot; and &quot;sort&quot; isn't there.<br><br>Is there a way to make this work? <br><br><br>Best regards,<br><br>Jeroen© 2009 Microsoft Corporation. All rights reserved.Mon, 21 Sep 2009 16:16:31 Ze2cfe2cf-aaa3-467e-881b-3998061d8c6dhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/e2cfe2cf-aaa3-467e-881b-3998061d8c6d#e2cfe2cf-aaa3-467e-881b-3998061d8c6dhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/e2cfe2cf-aaa3-467e-881b-3998061d8c6d#e2cfe2cf-aaa3-467e-881b-3998061d8c6dJeroen Van Bastelaerehttp://social.msdn.microsoft.com/Profile/en-US/?user=Jeroen%20Van%20BastelaereDataFormWebPart in SharePoint designer linked to SQL not being able to filterHello,<br> <br><br>I am trying to make a DataFormWebPart in SPD. My webpart gets its data from an SQL table, I tried both through a shared procedure and through just selecting the table I needed.<br><br>I can enable the toolbar to do sorting and grouping as it should, but I've been trying to get the filter in the toolbar to work but this just doesn't want to show as it does when I get data from a sharepoint list.<br>The checkbox to enable filtering (where you can also check &quot;grouping&quot; and &quot;sort&quot; isn't there.<br><br>Is there a way to make this work? <br><br><br>Best regards,<br><br>JeroenThu, 06 Nov 2008 15:31:36 Z2008-11-06T15:31:36Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/e2cfe2cf-aaa3-467e-881b-3998061d8c6d#c0363d58-f0aa-44d6-9416-17e0f0cafb98http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/e2cfe2cf-aaa3-467e-881b-3998061d8c6d#c0363d58-f0aa-44d6-9416-17e0f0cafb98Lionel Chen - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Lionel%20Chen%20-%20MSFTDataFormWebPart in SharePoint designer linked to SQL not being able to filter<font face=Calibri>Hi Jeroen,</font> <p style="margin:0in 0in 0pt"><font face=Calibri> </font></p> <p style="margin:0in 0in 0pt"><font face=Calibri>There is a workaround to realize filtering function, specifically on the modification to correct the XPath expression.<br><br></font></p> <p style="margin:0in 0in 0pt 0.25in"><font size="+0"><font face=Calibri>1.</font><font style="font-weight:normal;font-size:7pt;line-height:normal;font-style:normal;font-variant:normal" face="'Times New Roman'">       </font></font><font face=Calibri>On the inserted linked source data view, click on the [&gt;] to bring up the Common Data View Tasks pane. Click <b>Filter</b>.<br><br></font></p> <p style="margin:0in 0in 0pt 0.25in"><font size="+0"><font face=Calibri>2.</font><font style="font-weight:normal;font-size:7pt;line-height:normal;font-style:normal;font-variant:normal" face="'Times New Roman'">       </font></font><font face=Calibri>On the Filter Criteria dialog, configure the filter. Example: Employee LName Begins With 'A'. <br><br></font><font face=Calibri><i>Note: the filter should get successfully applied (albeit, incorrectly) and nothing should show in the data view.<br><br></i></font></p> <p style="margin:0in 0in 0pt 0.25in"><font size="+0"><font face=Calibri>3.</font><font style="font-weight:normal;font-size:7pt;line-height:normal;font-style:normal;font-variant:normal" face="'Times New Roman'">       </font></font><font face=Calibri>Go to code view, and search for 'A' (or whatever filter criteria you used). Change the following XPath on the following code (just an example, change your code according to this) snippet from:</font></p> <p style="margin:0in 0in 0pt"><font face=Calibri> </font></p> <p style="margin:0in 0in 0pt"> <p style="margin:0in 0in 0pt"><font face=Calibri></font></p><font face=Calibri> <p></p> <div style="border-right:#7f9db9 1px solid;border-top:#7f9db9 1px solid;font-size:11px;overflow:auto;border-left:#7f9db9 1px solid;line-height:100%! important;border-bottom:#7f9db9 1px solid;font-family:Courier New;background-color:white"> <table style="border-top-width:0px;border-left-width:0px;margin:2px 0px;width:99%;border-bottom:#eee 0px solid;border-collapse:collapse;background-color:#fff;border-right-width:0px" cellspacing=0 cellpadding=0> <colgroup> <col style="padding-left:10px;font-size:11px;border-bottom:#f7f7f7 1px solid;font-family:Courier New;white-space:nowrap"> <tbody> <tr> <td><font style="font-size:11px"></font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:variable </font><font style="color:red">name</font><font style="font-size:11px">=</font><font style="color:blue">&quot;Rows&quot;</font><font style="font-size:11px">   </font></td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr> <tr> <td></font><font style="color:red">select</font><font style="font-size:11px">=</font><font style="color:blue">&quot;/dsQueryResponse/JD_Edwards_Test_Data/Rows/Row[starts-with(normalize-space(../../../Rows/Row/@Employee_x0020_LName), 'A')]&quot;</font><font style="font-size:11px">/&gt;  </font></td></tr> <tr> <td style="background-color:#f7f7f7"> <br></td></tr></tbody></table></div> <p style="margin:0in 0in 0pt"> </font></p> <p style="margin:0in 0in 0pt"><font face=Calibri>to:</font></p> <p style="margin:0in 0in 0pt"><font face=Calibri> </font></p> <p style="margin:0in 0in 0pt"> <p style="margin:0in 0in 0pt"><i><font face=Calibri></font></i></p><font face=Calibri> <p></p> <div style="border-right:#7f9db9 1px solid;border-top:#7f9db9 1px solid;font-size:11px;overflow:auto;border-left:#7f9db9 1px solid;line-height:100%! important;border-bottom:#7f9db9 1px solid;font-family:Courier New;background-color:white"> <table style="border-top-width:0px;border-left-width:0px;margin:2px 0px;width:99%;border-bottom:#eee 0px solid;border-collapse:collapse;background-color:#fff;border-right-width:0px" cellspacing=0 cellpadding=0> <colgroup> <col style="padding-left:10px;font-size:11px;border-bottom:#f7f7f7 1px solid;font-family:Courier New;white-space:nowrap"> <tbody> <tr> <td><font style="font-size:11px"></font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:variable </font><font style="color:red">name</font><font style="font-size:11px">=</font><font style="color:blue">&quot;Rows&quot;</font><font style="font-size:11px"> <br></font><font style="color:red">select</font><font style="font-size:11px">=</font><font style="color:blue">&quot;/dsQueryResponse/JD_Edwards_Test_Data/Rows/Row[starts-with(normalize-space(@Employee_x0020_LName), 'A')]&quot;</font><font style="font-size:11px">/&gt; <br></font></td></tr></tbody></table></div> <p style="margin:0in 0in 0pt"><br><em>Note: the change occurs within the normalize-space function. The ../../../Rows/Row/ is erroneous as we are already at that level in the XML structure.<br></em> </font></p> <p style="margin:0in 0in 0pt"><font face=Calibri>After make the change, the data view should now filter as expected.</font></p> <p style="margin:0in 0in 0pt"><font face=Calibri> </font></p> <p style="margin:0in 0in 0pt"><font face=Calibri>Hope it helps! If I misunderstood your concern, feel free to correct me.</font></p> <p style="margin:0in 0in 0pt"><font face=Calibri> </font></p> <p style="text-justify:inter-ideograph;margin:0in 0in 0pt;text-align:justify"><i><font size=2><font face=Calibri>Best Regards,</font></font></i></p> <p style="text-justify:inter-ideograph;margin:0in 0in 0pt;text-align:justify"><font size="+0"><i><font size=2><font face=Calibri>Lionel</font></font></i></font></p>Mon, 10 Nov 2008 07:12:37 Z2008-11-10T07:13:55Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/e2cfe2cf-aaa3-467e-881b-3998061d8c6d#283a0fab-c84c-463a-84e4-025da384b04bhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/e2cfe2cf-aaa3-467e-881b-3998061d8c6d#283a0fab-c84c-463a-84e4-025da384b04bvomdanhttp://social.msdn.microsoft.com/Profile/en-US/?user=vomdanDataFormWebPart in SharePoint designer linked to SQL not being able to filterI tried the above in the primary list of a linked aggregate datasource and it works fine.  But is it possible to filter on field in the secondary list of the linked data source?  And if so, how?  thanksMon, 21 Sep 2009 16:16:29 Z2009-09-21T16:16:29Z