Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have got list with subfolders. I would like filter list items in current subfolder using additional caml query.

I would like to add filtering functionality by modifing caml query. I try to update XsltListViewWebPart and set its XmlDefinition to customized (at custom webpart OnLoad method)

I set XmlDefinition value to:

<View Name="{04AD128C-7FAB-4BD6-A62C-739FBC77A09C}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" DisplayName="All Items" Url="/Lists/AgreementInvoicePositions/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png"><Query><OrderBy><FieldRef Name="ID" /></OrderBy><Where><In><FieldRef Name="ID" /><Values><Value Type="Integer">4309</Value><Value Type="Integer">4310</Value><Value Type="Integer">4311</Value><Value Type="Integer">4312</Value><Value Type="Integer">4313</Value><Value Type="Integer">4314</Value><Value Type="Integer">4315</Value><Value Type="Integer">4316</Value><Value Type="Integer">4327</Value><Value Type="Integer">4328</Value><Value Type="Integer">4329</Value><Value Type="Integer">4330</Value><Value Type="Integer">4331</Value><Value Type="Integer">4332</Value><Value Type="Integer">4333</Value><Value Type="Integer">4334</Value><Value Type="Integer">4335</Value><Value Type="Integer">4336</Value><Value Type="Integer">4337</Value><Value Type="Integer">4338</Value><Value Type="Integer">4339</Value><Value Type="Integer">4340</Value><Value Type="Integer">4341</Value><Value Type="Integer">4342</Value><Value Type="Integer">4343</Value><Value Type="Integer">4344</Value><Value Type="Integer">4345</Value><Value Type="Integer">4346</Value><Value Type="Integer">4347</Value><Value Type="Integer">4348</Value><Value Type="Integer">4349</Value><Value Type="Integer">4350</Value><Value Type="Integer">4351</Value></Values></In></Where></Query><ViewFields><FieldRef Name="ID" /><FieldRef Name="Attachments" /><FieldRef Name="LinkTitle" /><FieldRef Name="Invoice" /><FieldRef Name="Quantity" /><FieldRef Name="UnitPrice" /><FieldRef Name="TotalValue" /><FieldRef Name="UnitType" /><FieldRef Name="RealizationProgress" /><FieldRef Name="ProgressInMoney" /><FieldRef Name="Modified" /><FieldRef Name="Order1" /><FieldRef Name="OrderColumn" /><FieldRef Name="PosOrder" /><FieldRef Name="Overrun" /><FieldRef Name="QuantityToUse" /><FieldRef Name="TotalAcceptanceValue" /><FieldRef Name="InvoicePositions" /></ViewFields><RowLimit Paged="TRUE">200</RowLimit><Aggregations Value="Off" /><Toolbar Type="Standard" /></View>

Url with custom webpart and XsltListViewWebPart

/Lists/AgreementInvoicePositions/AllItems.aspx?odrg=True&pwz=False&grp=68416&grp=68437&RootFolder=%2fLists%2fAgreementInvoicePositions%2fZlotow%2f10731&FolderCTID=0x0100FDCDB038B8364219BD7ED58309F7AE53006FB446DB3E8A44409531E0C39EE6C9B1

It does not work and show all items. Items should be filtered to specified in caml query (In clause)

share|improve this question
    
any other way is Possible for this problem . –  user15697 Mar 19 '13 at 6:19
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  SPArchaeologist Mar 19 '13 at 8:24
    
I have the same problem, i can not add the following code to the xml definition of my custom view: <Method Name="ReadList"> <Filter Name="ThirdPartyCode" Value="{ThirdPartyCode}"/> </Method> I have tried to use the setViewXml method, the Method method, the SchemaXml property, the HtmlShemaXml... nothing work. Is there any solution to fix this? –  Mehdi Mar 29 '13 at 16:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.