I am to use SharePoint Designer, no custom c# code.
I am currently using a SharePoint:SPDataSource on a DVWP to show a list. When the SelectCommand is blank, it works fine but I will need to create dynamic filter.
Working Data Source:
<SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="" UseInternalName="True" UseServerDataFormat="True" ID="spdatasource2">
I have a choice field, myField which is either 'Public' or 'Private', currently I am only looking to find items with 'Public'. I have tried:
SelectCommand="<View><Query><Where><Eq><FieldRef Name='myField'/><Value Type='Text'>Public</Value></Eq></Where></Query></View>"
Errors: One or more field types are not installed properly
Selectcommand="<View><Query><Where><Eq><FieldRef Name="myField"/><Value Type="Text">Public</Value></Eq></Where></Query></View>"
Errors: Cannot Complete this action
Eventually I am looking to build an equivalent of
SelectCommand = "Select * From myList Where myField like '"+@selectParam1+"'" <SelectParameter ID='selectParam1' DefaultValue="*" Location="QueryString"/>
I have also tried to use ajax on the address:
This always downloads a file of the default view instead of show xml causing the POST request to fail.
Another attempt was to use xsltListViewWebPart but I could not get a valid query in that either.