We need to list documents, list items, etc from a Sharepoint Search Server Express Index by the created date. The problem is we can't find it in the index even though we've tried to map it to everything we can think of.
In the Central Admin/Shared Services Administration you will go to the Search Administration page. I added the metadata properties of most of the date/time fields I could find that could be the Created Date that I am looking for. I have tried all the following properties and none of them return the date I am looking for.
I then “Reset all crawled content” and ran a full crawl.
We are using Search Server Express 2008 and WSS 3. We call the Microsoft.Office.Server.Search.Query.FullTextSqlQuery to return the data.
We use a query like this:
#"SELECT Title, SiteName, SiteTitle, Write, Path, Filename, ListId, ListItemId,
Created,CreatedBasic14,CreatedBasic16,CreatedBasic4,CreatedDC, CreatedOffice10, CreatedOffice11,CreatedOffice13,CreatedStartDate,CreatedStartDate1,CreatedPublishedDate,CreatedDateOpened
FROM portal..scope()
WHERE (CONTAINS (contentclass,'STS_ListItem_DocumentLibrary'))
AND ContentType <> 'Folder'
AND (SITE='" + SPContext.Current.Site.Url + "')
My question is what property do I have to set that will allow me to get the correct created date?
Map "Created" to "Basic:15(Date and Time)" to get creation date of a list item.
Answered by Maksymilian Mulawa on sharepoint.stackexchange.com
Related
I'm currently working on an automation project that uses Sharepoint to store invoices. I have used the Sharepoint package for UiPath to do the uploading; now, I'm trying to set a column/metadata value for an already uploaded PDF in Sharepoint. To do this, I am using the 'Update list item' activity that takes a dictionary of the metadata to update and a CAML query string that it uses to search for the item (I am using the invoice number as a reference). However, it's not working; no error, it just simply doesn't update anything.
Is there a mistake in my setup of this activity (see screenshot below) or is it just not possible to use this activity to update Sharepoint metadata? If I can't use this activity, how would I build an HTTP request to achieve this / is an HTTP Request activity the best way to go?
I should note that the PDFs I'm trying to update are stored within folders which have the structure /SupplierInvoice/<SupplierName>/<Year>/<Month>/<invoice>.pdf
The problem is that the string delimitators are messing with your query, you should use Chr(34) to simulate the substrings. Using this will most likely solve your problem as it did to me:
In this case I'm updating those that match the "Title" column in Sharepoint (that is a Text Type) with "your_variant_value" that is a a variable string
" <FieldRef
Name="+Chr(34)+"Title"+Chr(34)+"/><Value
Type="+Chr(34)+"Text"+Chr(34)+">"+your_variable_value+"
"
I am trying to get the Search Content Web Part to display an aggregation of announcements from various announcement lists in a site collection.
I created the announcement lists using the "add an app" then "Announcements" so I am assuming that this is a list of the ContentType Announcement? I've added a new announcement to the list with a title of "this is a test".
After I have added the Search Content Web Part to a page (for test purposes a page in the same site as the announcement list) and gone to set the Query on the web part to:
ContentType:0x0104*
No results are being returned. To check that the announcement has been indexed by the crawler changed the query to:
Title:this is a test
Now two results are displayed 1 a csv and the other the announcement with a ending with ../DispForm.aspx?ID=1 .
Any help much appreciated.
Use ContentTypeId. I know that by default ContentType is shown this way, but it might be a bug. Just try ContentTypeId.
I am trying to use owssvr.dll and its URL API in SharePoint 2007 to get some list metadata. For most of the lists in my site of interest, I can use a url formatted like so:
http://hts-app1/compounds/_vti_bin/owssvr.dll?XMLDATA=1&List={F987723C-28A4-47D3-83D7-19094B0267DF}
I get back an xml-based list of field metadata for the default view and a list of records in the list. But when I try to use another guid for a separate list, I get an empty response from the web server. It's a 200 response code, but the other headers look like:
Connection:close
Date:Thu, 24 Mar 2011 17:38:46 GMT
MicrosoftSharePointTeamServices:12.0.0.4518
Server:Microsoft-IIS/6.0
X-Powered-By:ASP.NET
I am pretty sure the list guid is valid, since I can match it with the guid for the list I can see in the listedit.aspx page. If I also format my url like so:
http://hts-app1/compounds/_vti_bin/owssvr.dll?XMLDATA=1&List={F987723C-28A4-47D3-83D7-19094B0267DF}&Query=*
with the Query=* parameter, I can get valid xml, but it's just showing everything, and not filtered for my view, and I'd really like to have the view.
I looked in the SharePoint log file, and I couldn't find anything that looked related to this request.
So, how can I debug this? I'd really like to use a simple http GET request to get back this metadata, and owssvr.dll seemed the ideal mechanism.
You can specify a specific view as well. Like this
http://{0}/_vti_bin/owssvr.dll?Cmd=Display&List={1}&view={2}&XMLDATA=TRUE
for example:
https://foo.com/extranet/_vti_bin/owssvr.dll?Cmd=Display&List=%7B7F7AFB9D%2D6D5D%2D4626%2DBD9D%2D085957DB79AB%7D&view=%7B111EC07E%2DF648%2D443B%2D8DE6%2DB53786BE6762%7D&XMLDATA=TRUE
The absolute easiest way to get the list and view guids is to goto edit the view and snatch the list & view info directly from the address bar.
1. That supplying GUID in the querystring of your URL works for one list and does not for other is probably because the lists are on different sites. Verify that the sitename is correct and that GUID is a List ID indeed.
Be wary of the fact that, however, above applies to both SharePoint 2007 and 2010, for SharePoint 2010 additional measures might be required depending on context from which you execute commands on owssvr.dll.
2.
query=* is not a filter parameter; it shows schema as well as data for all available columns in the list, including SharePoint internal columns, which normally you never get to see in ways other than programmatic access.
3.
To get only those columns that are visible in the current default view call display command on owssvr.dll while xmldata parameter is set true; like this:
http://hts-app1/compounds/_vti_bin/owssvr.dll?Cmd=Display&List={F987723C-28A4-47D3-83D7-19094B0267DF}&XMLDATA=TRUE
Again this is for SharePoint 2007 only and depends on execution context.
4.
with the Query=* parameter, I can get
valid xml, but it's just showing
everything, and not filtered for my
view, and I'd really like to have the
view.
Oh but this is not called filtering; filtering is only based on columns values. For this use additional FilterField1 and FilterValue1 parameters.
http://hts-app1/compounds/_vti_bin/owssvr.dll"
+ "?Cmd=Display&List={F987723C-28A4-47D3-83D7-19094B0267DF}"
+ "&XMLDATA=TRUE&FilterField1=YOUR_FILTER_COLUMN_NAME&FilterValue1"
+ YOUR_FILTER_COLUMN_VALUE
Takeoff "(double quotes) and +(plus) and (returns) before testing in browser.
Our organization has started a project hoping to use sharepoint to create Electronic Records for Clients rather than the paper method which tends to have documents get lost etc.
I have been tasked with interfacing with sharepoint to find documents associated with a given client. Each document has sharepoint metadata that stores a ClientNumber, but I am having issues finding how to use the QueryService web service to search on this specific field. There are about 30 document libraries I am to search through, so believe the QueryService is probably a better fit for this particular situation than ListService.
I am using VB code to do the searching, and the following is the querytext I am sending to the QueryEx Function.
...<QueryText type='MSSQLFT'>
SELECT rank, title, path, Description, Write, Size, author, sitename, FileExtension, HitHighlightedSummary, HitHighlightedProperties, keywords, IsDocument from Scope() WHERE FREETEXT(DEFAULTPROPERTIES,'" & Me.ClientNumber.Text & "') AND IsDocument = 1 ORDER BY Rank DESC -- </QueryText>...
I would like to be able to include something in the WHERE clause that explicitly says a match must be found in the ClientNumber field but I have yet to find a way to do this, and as a result of this we are getting results where other metadata or one of the document properties such as document size is equal to the client number.
I have found documentation that there is a way to expose metadata through property mappings and this then becomes searchable. I however cannot find a way this is done in WSS 3.0, is this a MOSS 2007 only feature, or a feature available in 2010?
If anyone can tell me if there is possibly some other way to search based on metadata, or give some insight as to where I should be looking for more information it would be greatly appreciated.
You need to install the Search Server Express from Microsoft, it is free and it gives you the MOSS search engine, where you can do anything you want
I had created a web part on MOSS 2007 which displays a organizational chart by searching (Full Text) the user profiles.
To identify the subordinates of a user, I used to search for users with the particular user in Manager property. The query looked like this:
SELECT AccountName, PreferredName, Manager, WorkEmail FROM scope() WHERE ("SCOPE" = 'People') AND Manager = 'domain\parent_user'
But, the same query does not run in SharePoint 2010 as Manager crawled property does not exists.
So, I created a new crawled property and mapped it to People:Manager(Text) now, the Manager property is always empty.
Even a full crawl after clearing the indexes also not helping.
Can anyone please help me in getting manager information in Full Text Search?
Thanks in advance!
Update: I tried mapping the crawled property with ows_Manager(Text) property also, still the same result.
After struggling a little, I got it working!
The new crawled property mapped to People:Manager(text) started giving values in search result by following the below steps:
Check Indexed checkbox in Manager User Profile property edit page
Reset crawl index
Full crawl again