Posts

Showing posts with the label Web Parts

Set SharePoint List Form Web Part field values using JavaScript when Creating New Item

How to set values of form fields generated by the SharePoint List Form Web Part when adding a new item to the list using JavaScript. Using a custom metadata field in a SharePoint list to set categorisation & filter criteria that is later used by List and Data View Web Parts to arrange & filter content for specific audiences.  Depending on the audience that a user is in, I wish to set alternate default values for specific fields rendered by the List Form Web Part. In most cases, a custom multiple choice field in the list will be set to a value which corresponds to the current user’s audience, but will sometimes need to be manually adjusted.  To improve the experience for end users, the appropriate checkbox option from the multiple choice field that corresponds to the current user’s audience will be selected when the form loads, and the default value for the field un-checked if required. The custom field is used in multiple content types across the primary site col...

InfoPath SharePoint Development

SharePoint News & Development Resources DevSharePoint.com provides the latest SharePoint news and resources. Stay up to date with SharePoint 2010, MOSS 2007, WSS, SharePoint Designer (2007/2010), InfoPath. InfoPath & SharePoint Development Tutorials, Resources & How To's InfoPathSharePoint.net provides the latest InfoPath development tutorials, InfoPath Form Services administration tips, tricks and how to's. InfoPath SharePoint Integration: Integrate InfoPath Forms with SharePoint lists, libraries & workflow. SharePoint & InfoPath News & Resources SharePoint Administration, Development, Design & Customization Resources from around the internet. SharePoint & InfoPath News. InfoPath SharePoint Integration. InfoPath Form Template Design. InfoPath Form layouts, design tips & techniques.

Web Part Connections Not working - Web Parts Disappearing off page

Scenario: Single Web Part being used to pass filter values to multiple web parts on a page.  After making changes to Web Part connections, only the most recent connection works.  All other connections previously configured on the source web part no longer worked.  The Web Parts being connected to were no longer displayed on the page.  In the end I was able to resolve the issue, but was not sure of the underlying cause.  My suspicions lean toward the custom web parts being used not being able to handle Web Part Connections properly. Issue: After completing the initial configuration of the various web parts on a page, I started configuring web part connections between the web parts.  I noticed that after configuring a connection, that it would be the only connection that works once applied.  Any previously configured connections to other web parts no longer worked and the web parts disappeared off the page. I found that if configuring the connectio...

Can't Deploy Solution Once Added to Solution Store - SharePoint (MOSS 2007)

Can't Deploy Solution Once Added to Solution Store Via Central Admin I tried deploying a custom Web Part solution to a MOSS 2007 environment via the Solution Management page in Central Admin.  I was able to select the solution, time to deploy (now) and the Web Applications to deploy to, then press OK to initiate the process.  From here I am taken back to the Solution Management page, where the solution I wish to deploy has the status “Deploying(scheduled at ... )”.  After a few seconds and a page refresh, the status returns to “Not Deployed” and the “Deployed To” value remains as “None”.  Issues Deploy Solution using STSADM I was able to add the solution to the solution store using the STSADM command line tool, but when trying to deploy the solution to Web Applications hosting SharePoint, the process didn't complete successfully although it states that it did. If I open the Solution Properties, the Last Operation Result and Details both state “The solution ...

Customise Table of Contents Web Part CSS Styles (TOCWP) MOSS 2007 - Page 2

Image
The following is Page 2 of a two page article relating to modifying the styles of the Table of Contents web Part (TOCWP) for SharePoint. Go to PAGE 1 of Customise Table of Contents Web Part CSS Styles (TOCWP) MOSS 2007 . Contents: Page 1 Article Overview 1. Table of Contents Web Part Configuration 2. Using Background Images in Style Classes 3. Override default CSS classes used by a TOCWP 3.1 Overriding Default Classes 3.2 Applying the New Style Classes to Override the Default Page 2 4. Replacing CSS Classes 4.1 Create new Style Classes 4.2 Customise the default XSL Stylesheet used by the TOC Web Part 5. Related Articles 4. Replacing CSS Classes This section explains how to create and apply new styles to specific presentation options for a Table of Contents Web Part. Once the new classes have been created, you need to also follow the steps later in this section relating to modifying classes via the default XSL st...

Customise Table of Contents Web Part CSS Styles (TOCWP) MOSS 2007 - Page 1

Image
The following explains (with examples), how to modify the Table of Contents Web Part (TOCWP) using CSS to display content from a SharePoint site and sub-sites based on the site navigation with a custom appearance. This allows content to be displayed dynamically by the web part based on the current site and any sub-site navigation and content without using Data Views or having to maintain link lists or similar. There are a number of methods that can be used to customise the layout of the Table of Contents Web Part. Some methods will result in the new styles being applied to every TOCWP across the entire site collection, where others allow you to customise the styles for a specific TOCWP on only one, or a selection of pages. The first method that I use is to override the default style classes for the TOCWP. This allows flexibility with the application of the new styles, as the new style classes that override the default can be place in a global style sheet, or on a page containing a Ta...

Split List View web part labels (javascript)

The following is a javascript function created to split long questions / column titles on a SharePoint survey or list when editing ( EditForm.aspx / DispForm.aspx ). I had a survey with questions containing hundreds of characters. When the EditForm.aspx / DispForm.aspx pages render the survey for completion, the questions are wrapped in < nobr > tags, which results in the page's width being much larger than the browser, regardless of resolution. The function takes all < nobr > elements and replaces those which match required criteria. Each question / column in the survey starts with a number, which is followed by the question ( "1. ..." "2. ..." etc.). The function runs through a series of tests to determine the currrent question. If the beginning of the line matches the required question number, contents of the element is replaced to include a break ( < br >) tag to split the line. Possible improvements: Split the question string after a s...

SharePoint XSL String Replacement Function

Creating a list view Web Part to display data from a look-up field containing multiple look-ups. I ran into a problem when creating a list view Web Part in SharePoint Designer that displays data from look-up fields. If the field only allowed a single look-up, the list view was easy to create with no customisation required for the Web Part to display properly. After adjusting the look-up column/field to allow multiple selections, the result was an "Unable to display Web Part" message. To allow the multiple selection look-ups to be listed I needed to customise the XSL template to list each value in the look-up field. The following XSL template I adapted from http://wwww.maya.com/local/doc/xslt/FAQ/html_format/xsl/sect2/replace.html l, which solved my problem. The data from the multiple selection lookup field is returned in a string format, with each selection delimited with a ";". The following function replaces each occurance of the first string ";" with ...