Comments (4)
@hanielc enclose the query in apostrophe's like the below
'<Where><Eq><FieldRef Name="ContentType" /><Value Type="Computed">News</Value></Eq></Where>'
else powershell will look to the space in between FieldRef Name as the end of the parameter's value
from pnp-powershell.
Hi,
Yes you can. The Query string is a normal CAML query. The MSDN page about the property is pretty limited unfortunately, https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.viewcreationinformation.query.aspx
You can however find a view in your site that uses a query that is pretty similar to the one you want to build, and then retrieve the query with:
$view = Get-SPOView -List <listname> -Identity <viewname>
$view.ViewQuery
I will update the description of the parameter to state that it is a CAML query.
from pnp-powershell.
I added the additional text in PR #56 . Thanks for bringing this to my attention!
Closing the issue.
from pnp-powershell.
Thanks for your prompt reply, Erwin. I tried your recommendation and got:
<Where><Eq><FieldRef Name="ContentType" /><Value Type="Computed">News</Value></Eq></Where>
However, it doesn't actually create the filter. Wrapping it in <Query>...</Query>
didn't work either.
Any other suggestions?
from pnp-powershell.
Related Issues (20)
- [BUG] Set-PnPGroup -SetAssociatedGroup Owners: Access denied.
- Example 1 incorrect on Clear-PnPRecycleBinItem Microsoft Docs page HOT 1
- Get-PnPTerm unable to retrieve labels HOT 2
- [BUG]
- [BUG] Term Store PnP functions fail when using Connect-PnPOnline -SPOManagementShell HOT 7
- [BUG]? - Grant-PnPTenantServicePrincipalPermission timing out HOT 2
- [BUG] false error reported from Add-PnPFolder on large Library
- Connect-PnPOnline- with an option of -ClientId and -ClientSecreat connects successfully but then get unauthorized(401)) for subsequent request example Get-PNPList etc.
- Critical problem with Apply-PnPProvisioningTemplate cmdlet: personal view is created as public view in the destination site
- [BUG] - Move-PnPFolder : The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
- [BUG] Get-PnPSite -Includes Usage Shows Zero for Bandwidth, Hits, Visits
- [BUG] "The user cannot create group sites in this tenant instance." HOT 3
- [BUG] ConvertTo-PnPClientSidePage fails at OfficeDevPnP.Core.Pages.ClientSidePage.AvailableClientSideComponents(String name) - A critical error occurred - transformation did not complete
- [BUG] Get-PnPTerm throws misleading error if term not found
- [BUG] Add-PnPWebhookSubscription. Body empty.
- [BUG]
- Get-PnPFolder : A parameter cannot be found that matches parameter name 'List'[BUG]
- [BUG] Search bar for List gets enabled while trying to hide suitebar search using "Set-PnPSearchSettings -SearchBoxInNavBar Hidden -Scope Web". Is there any way to hide search bar for list too.
- [BUG] GCC High client tokens Confidential Client is not supported in Cross Cloud request
- Set-PnPSite command reporting (401) Unauthorized Error, in environment where legacy authentication is blocked HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pnp-powershell.