I want to place a custom webpart on the main page of my sharepoint portal that will look through a specific list. I want also to look for the information in the specific fields (like name, surname, phone number etc.). In MOSS 2007 we have Microsoft.Office.Server.Search namespace but is it possible to write this kind of webpart in WSS?
In WSS you have two options:
1) You can execute a CAML query against the specific list using SPList.GetItems
2) Use KeywordQuery or FullTextSqlQuery from the Microsoft.SharePoint.Search.Query namespace
SharePoint web parts have full access to the SharePoint object model, including being able to access list and list items. Now, that doesn't include any kind of search indexing, so if this list is really large, iterating through it to find interesting results might not be a very good idea. (Hence search being a paid MOSS feature....)
Related
I have been trying to search through my SharePoint site. I am able to get results for a single drive:
xxx.sharepoint.com,xxxxxx-xxxx-xxxx-xxxx-xxxxxx,xxxxx-xxxx-xxxx-xxxx-xxxxxx/drives/xxxxxxxxx/search(q='{content}')
But if I do the same search at drive/root, I don't get any result:
xxx.sharepoint.com,xxxxxx-xxxx-xxxx-xxxx-xxxxxx,xxxxx-xxxx-xxxx-xxxx-xxxxxx/drive/root/search(q='{content}')
We basically want to perform a search across the entire subsite.
Hey a bit late but I've just discovered you can use the /sites endpoint to retrieve all items in a site by expanding relationships of graph objects. Could you try use:
https://graph.microsoft.com/v1.0/sites/root/sites?$expand=lists($expand=items)
This seems to return all list items in all subsites under the root site. You should hopefully then be able to to filter further by subsite, list, field values etc.
I have a list with multiple records in it. I want to filter some records from the list and display it on subsite web page. I goggled it and I found out that there is no direct way to use the list from parent site into subsite. I am using Sharepoint 2013 and I have full control access to site.
As far as I'm aware, you're correct--there doesn't seem to be a way to pull list items from a parent site to a subsite, at least not in the sense that you most likely want. This is a shot in the dark, but if you're looking to pull in static list items, such as street suffixes or product names, you can create a content type in your parent site that will pass down values you define in a choice field. If you really need dynamic linkage, give this a look: http://www.boostsolutions.com/cascaded-lookup.html
You have two options to display a SharePoint list from Parent site in a subsite:
Using Data View Web Part.
Using Content Query Web Part.
Check the details steps at
How to display a sharepoint list from parent site in subsite?
SP 2016 - Display list from Parent site in sub-site
We'd like to create something within SharePoint that would allow to ensure a set of forms is completed for each employee (i.e., Tax forms, non-compete, etc.). HR staff would have access to a page listing employees and upon selecting a specific employee, they would be shown a list of these completed forms which could be opened to view the document.
Is this scenario something that can be done fairly easy with out of the box features? Or would a custom workflow, web part, or something else be the best bet?
The easiest way to do it out of the box would be to use a single Document Library (or possibly Forms Library) that has multiple document/form templates in it. Then create a View that groups by Created By. HR could then expand on an Employee and see what has been filled out.
To limit an Employee from seeing the forms of another Employee, set the View and Edit options to Only Their Own. Make sure that HR has a higher level of permissions for the list and/or site in order to see all Employees.
If you don't have complex workflows - my advice will be to populate SharePoint List using InfoPath Forms (this article will be a good start).
In other case solution heavily depends on your business requirements and may vary from simple SP List to custom workflows with infopath forms and custom webparts.
Our company is split into divisions. These divisions work for client companies and are then further split into account teams that work on projects for a product of the clients.
So the structure goes Division > Clients > Accounts > Projects. And this is mirrored in the setup of our sharepoint installation. At each stage from Division to Account there is a subsite. Access to each subsite is controlled by AD groups and on each subsite there is a 'latest news' announcements list
What we want to do is have a 'wall' of announcements that feeds through so that each user can see on the top-level site all the posts in all of these anouncement lists, but this must be filtered using the AD groups that they are a member of so that confidential information isn't shown to someone who shouldn't see it.
Can anybody think of a way to do this?
Let's see - are those lists split accross site collection? With what tool you want to accomplish this?
You have several options (if you are within a site collection):
Use Content Query Web Part to
aggregate list items. You can
customize it to display fields
you like the way you like.
You can use SharePoint Designer.
Using Object Model/WebServices: Use
SPSiteDataQuery class to query
multiple lists at once and then
SPGridView to display data.
As you have a MOSS build, you could
even use CrossListQueryCache.
It's also a cross list query that
has builtin caching and audience
targeting. Be sure to read this to be sure caching is working.
If you want to aggregate between multiple site collections, then you will need to write code that get's all your SPSite objects and execute SPSiteDataQuery on them.
Maybe you can find out some additional information on Rollup of all Tasks of a Recurring Meeting in SharePoint
Here is how we are doing it.
Set up a content type for each level of announcement. We have national, state, district and the basic site level announcements. Therefore I have 1 national content type, 10 state content types (because we are in 10 states) and 1 content type for each district. All of these content types inherit from the base Announcement type with no modification.
I added a content query web part. I exported it. I edited the XML in the .webpart file to point to a new custom ItemStyle_Announcements.xsl file I had created. I import the modified .webpart and delete the default Content Query Webpart.
I modify the ItemStyle_Announcements.xsl to create the structure and divs I need for the styling. I add styles to the default style sheet I have already created for my site to get the look and feel I want. (I happend to have two styles for these, one featured/most recent item which is big and full, then a listing the next 10)
I find an announcement list that will possibly post to the national new. I add the content types as needed. Now the end user can choose what scope of announcement they want from the New menu.
This remaining issue is that right now, the States and Districts must have TWO announcement webparts on their home pages. One that lists everything local to that site (regardless of scope) and one that has unit announcements aggregated from the other sites in the same state / district.
let me explain my current situation
i have a SharePoint site lets say it is MAIN, and a subsite lets call it SUBMAIN
in MAIN i have a list called "a" and in subMAIN i have a list called "b"
both lists have the exact same columns,
i need to show the content of both lists (ordered by modified date for example) in one webpart in the main page i know it is possible some how but couldnt get to it.
currently i am showing only the content of list "a" in a content query webpart (i have changed the way it display and added to it horizontal merquee) so it will be nice if somehow i can add contents of list"b" also to the same content query webpart (but if it is not possible in content query webpart its ok, at least let me know what other options do i have)
your help is appreciated
If you are using SharePoint Designer to do this, take a look at this blog.
If you are building your own web part, I would perform two queries on the SPList objects. You can then aggregate, sort, etc. the results however you would like. If you aren't familiar with SPList, you can look here for the MSDN overview.
I've built web parts to display items from 2 different lists, and I did something similar to what Scott Price suggested. I used an SPQuery object for each list and used it to get DataTable objects that I could then use with things like Repeaters and DataLists. You could merge your two tables and do something similar.
The biggest trick for me was setting up the custom templates for DataBinding in a webpart. To do that, I created a custom class that implemented the ITemplate interface and then emitted the HTML for each item from the template class in an event handler. Then, you just create an instance of your template class and set that as the ItemTemplate property of your, say, DataList.
This post and this one do a better job of explaining that approach, but the nice thing is that you have complete control of the markup, and you can style it as you like.
If you're not looking to code your own solution, you might consider this webpart on codeplex:
http://rssaggregator.codeplex.com/
It's actually an RSS aggregator, but since all SharePoint lists have built-in RSS feeds, you can use it just as well to aggregate the SharePoint lists from the different sites.
Another approach is SLAM, SharePoint List Association Manager, an open source project my company created and actively supports. SLAM will allow you to configure those two lists to be automatically synchronized to SQL tables at which point you can create a query to join the two. If you have the two lists built off a content type (since they have the same fields) you can actually slam the content type and have both lists in the same SQL table.