Sharepoint online use the same new/display/edit forms for two or more libraries - sharepoint-online

I'm trying to develop a Sharepoint online site to show inventory of every departments. Since I have several thousands of items, I separate the items into several libraries by departments. Each library will have the same columns.
Currently, I'm facing a problem of how to standard the new/display/edit forms for all libraries. Of cause I can use library template to do so. But what if I need to update the form, e.g. add a reference link or change the layout? Then I need to modify the form one by one for each library.
Is there any solutions that I can create one master form so that (1) it can be applied to two or more libraries, and (2) whenever the master form is changed, the change is automatically applied to the libraries?
Thanks

This is a great use case for Content Types.
At the Site Settings level, Create the columns you want. Then create the Content type you want, called "Inventory" for example. Add the columns to that Content Type.
Add the content type to each library.
Library Settings -> Advanced Settings -> Allow Management of Content Types
Remove the default content type from the library settings page
Now, you can update the columns at the site Content Type level, and it will publish to and update each library.

Related

SharePoint - Document Filtering (Tags/Metadata?)

I'm creating a SharePoint site which will be used to dynamically store and display documents on various pages, among other things. Is the following possible?
My view is to have one central Document Library which will include all files. Files with have 'tags' or 'metadata' attached to them. On pages, i will add a document library (or similar) webpart and then call only those documents with a certain tag/metadata.
For example.
Document Library ('Folder') - Contains ('Project Document.xls' and 'Training Document.ppt')
On 'index.html' i will add 'Folder' to the page, but i only want to display 'Project Document.xls' not 'Training Document.ppt'.
I'm aware that you can set up target audiences but that requires a lot of user management.
Thanks for any advice.
If I understand you correctly, this sounds like something you could accomplish using a filter. The name of the file is stored as a column. Try editing the web part on that page and edit the current view. That view will be cached for that page without changing the view across the site. If you want to be able to dynamically choose the document you display then one option is to add an HTML Form web part (which contains a text box and submit button), connect it to the doc library web part and filter the name column based on the HTML Form web part.

Sharepoint 2007 Custom List Templates

Hi I am wanting to create a little tutorial on how to create a webpart that I have added to one of the website's I have created.
I know that there is the List Templates gallery in which I could use to give this part as a file however I am using Site Columns.
Due to this will this cause errors when importing to a new Site?
Will the user need to create the Site Columns previously and will they automatically be used once importing my Custom List file?
or will when it is imported the column appear?
I don't currently have another site to test this on as yet so was wondering if anyone here already knew the answer for this?
Any light that can be shed on this question is very much appreciated and thanks in advance as well =]
I am totally confused by your question. How are List Templates gallery and a custom webpart related ?
Probably you meant site Template Gallery ?
What you need to do is :
- Create a solution package
- Create two features - one for your custom columns and custom webpart
- Optionally create a list template feature to define the columns in the list.
If this is truly a list template (you created it by going into List Settings and selecting Save As Template), then the site columns, content type, and list schema should all be contained in the manifest.xml file inside the stp file. You should not need to create anything manually to generate a list based on a template uploaded to the List Templates Gallery.
If this is a list definition feature, then you should create features that define the site columns, content type, and the list definition. The users can manually create site columns that match on name, type, and just about every other attribute, except the one that matters most - ID. Each time a site column is created in the browser, it will be assigned a different ID. That ID will not match what you have defined in your list definition.

Complex form design in Sharepoint

I'm trying to build a form for WSS 3.0 which has the following two characteristics:
Have several sub-records in each records which contains few specific fields.
Can export to HTML or something similar which can be viewed in every browser.
I realize (unless I'm mistaken) I can achieve 1 only by using InfoPath and RepeatingSection/RepeatingTable/etc.
As for 2, I see InfoPath is only capable for exporting to MHT/PDF/XLS, none ideal for me, since the goal is to create a something that can be published to the web.
Any hints about better way to achieve this?
Correction for 2: I meant that the InfoPath form should be editable within our intranet, but exported as a read-only-web-page for our web site. So I meant "exporting" and not "publishing".
One way to do this would be to use a database as the primary data source for your forms, so that all form data is saved there. You could then build a website that queries the database for all info.
Another alternative would be to take the infopath form data (saved as an xml file) and publish it on a web server with an XML Style Sheet to define its format. You could do this via an XML control in ASP.net.
These solutions might require more elbow grease than some other solution, but I believe either would work.
Perhaps creating a custom fieldtype is a possiblity. Create a fieldtype that has some kind of collection as value.
As for 2, I see InfoPath is only
capable for exporting to MHT/PDF/XLS,
none ideal for me, since the goal is
to create a something that can be
published to the web
That's not right, InfoPath forms can be published to the web. When publishing the form to the SharePoint via the InfoPath client, you can select an option saying that this form should be editable within a browser. But beware that some form features of InfoPath are not available when you do that.
Or do you have a different understanding of "can be published to the web"? For me it means, creating a new item in the library to which the InfoPath form is attached to --> Form is opened in the browser --> user fills in the form --> user klicks the save button --> info path document is saved to the library and closed.
Just an idea:
If InfoPath (along with MOSS) is not an option, then perhaps you could mimic its behaviour through a custom edit form, if you want the data to be outputted into a SP list. I'm thinking about a custom edit form with dynamic html controls (for the sub-records), and you can achieve this by dynamically inserting objects into the DOM as your tree structure requires. Then, on form submit, an event handler on the list would parse the data submitted by the form and store it as you see fit (in an xml serialized in a custom field, for example).
If it's not going the be a custom edit form for a list, then the same functionality above can be stored in a site page with code-behind (beware of customizations) and use a hidden SP list as your data storage.
As for the exporting section, perhaps an application page linked in the ECB menu of that list would get the above mentioned xml and display it nicely.

Custom SharePoint List View - can I put it in a feature (WSP)?

Here's my situation:
I'm working in SharePoint 2007 Enterprise, I have a feature that creates a list for me when I deploy and activate it. My usual workflow thus far has been to deploy the solution, activate it, then open up SharePoint Designer to customize the list.
My customizations are typically pretty complex, but I'll keep things simple. In this case, let's just say that I edit AllItems.aspx, convert the data view to an XSLT data view, then I add one column with static text.
I've used a few different tools (SPSource, VSeWSS, SharePoint Manager, OCDExportList, etc) to extract my custom schema.xml and all the default views, but I have yet to have any luck figuring out where the the code for AllItems.aspx is now that it's been customized.
When I extract (using any of the tools above) AllItems.aspx is no different than the default. The <View> element in schema.xml is reduced to one line, for example:
<View DefaultView="TRUE"
MobileView="TRUE"
MobileDefaultView="TRUE"
Type="HTML"
FPModified="TRUE"
DisplayName="All Documents"
Url="Forms/AllItems.aspx"
Level="1"
ContentTypeID="0x" />
I'm really stuck here... I've got no clue what to do. Is it even possible? It would save me a great amount of time (and documentation) if I could include my customizations in my feature.
If there's any other info I'm missing that would help, let me know... thanks!
Latest findings:
I've found out a bit more in the past couple hours. If I save the list as a List Template, then save the .stp file locally as a .cab file I can extract its contents. One of the files is manifest.xml which contains the schema.xml as well as a few other sections.
One of those sections is a <webparts> section that has a <webpart> for each view. Each of those <webpart> elements contains a really long string of characters... no clue what those characters actually represent.
The important thing is that I think any custom views have to actually be Web Parts if deployed as part of a solution... but I'm not positive.
I have faced a similar issue a while ago. I had to create a very customized view and I had to give up the ListFormWebPart completely, and have created my own webpart to render the data.
Generally, when you customize the aspx file in SPDesigner, all your changes will be in the aspx file itself. Open it in SPDesigner and you will see there all the changes you have made. After you have converted to the XSL Data View, the standard ListFormWebPart is replaced by a DataFormWebPart, which doesn't care about the <View> tags specified in the schema.xml; Look in the aspx file itself for the ListFormWebPart.
Why not do all the customizations you want on a list, save the list as a template (it will include the associated AllItems.aspx) and then use that template in your feature to create your list? You could add the extracolumn from code (if it's dynamic and cannot be included in the template), and so on.
Yes you can. Get the Sharepoint manager tool from Codeplex
http://spm.codeplex.com/
Install it on a machine in your farm, it will allow you to browse the farm via a tree view that shows all objects.
Make the list via the Sharepoint GUI, then browse to it w/ SPM.
SPM will allow you to extract the MOSS/WSS created xml that describes the list view (it shows up in the left hand property grid), which you can then plop into your manifest.xml
I have a similar issue and have been doing a lot of research into this. The dataview web part to me is one of the most powerful components in Sharepoint. Unfortunately I have to provide my solution as a .wsp package and that means that I can not just make the site and use Designer on that site. I have taken a 2 step approach in that I used designer to create my dataview and I also edited the code of that dataview to replace the ListID and Guids to ListName and the actual list name. This allows it to be exported and used in any page/site as long as the list name is the same. I am creating a webpart page document library also in my solution and I believe I can add the pages that have the webparts to this library using the onet.xml file. I will try to get the results of that test in as soon as I can do it.

Global Customized View for Document Libraries in Sharepoint

In Sharepoint document library, when we create a new document library, the default view is 'All Document'. This one:
We can make a custom view from View > Create View (at the upper right corner of document library view). I created a new standard view and named it 'Chromed View'. I edited it, then I saw that this view only applied on current document library:
The other document libraries cannot use this view.
I develop a system that triggers document library creation from CRM (the document library's view from CRM Iframe is using that chromed view). The creation itself went well, I can create document library using Sharepoint web services. But I still cannot apply a custom view automatically for that newly created doc lib.
My question is, can we make a view that is global (not in one document library only) so that we can use that global view for any document library.
Thanks b4 for any opinion :)
You could also create a new custom document library type, with the view embedded in it. Whenever a new library is created from the new doc lib type, it will get the new view.
This is still a not truly "global" view, and you may have the same problems if the view gets changed (the view won't be updated on document libraries that have been created with previous versions of the view).
One way to do this is to create a feature with an event receiver. When a user creates a list, you can check if the list is of the proper type (101), and then add new views to it. The feature could also add this view to existing document libraries on activation. Shouldn't be too much of an effort.
The view is not truly global. As list definitions are duplicated for each instance, there are no such thing as a global view (afaik) in WSS. We could all hope that views are a part of content type in the next version.
To globally change all document libraries and to change all existing libraries you need to edit the XSLT file that is in the XSL folder in layours/templates
There are a couple of them in there but these are how all the libraries are generated with this u can basically specify how a default"" library would look. Make sure to make a backup for these files though. Also creating a new content type and copying these xlts to a different file name and then linking your content type to these instead could also be a solution so when a user creates a new library using ur content type you can make sure that they are created in a way that you want.

Resources