How to Prevent users from changing views in Sharepoint
By peter.stilgoe
If you need to prevent users from seeing the view menu allowing them to pick which views they want to use you can remove this easily by:
Browse to the relevant list or library
Click Site Action and select Edit Page
On the Web Part Click edit –> click Modify Shared Web Part
Change Toolbar to either ‘Summary’ or ‘No toolbar’
Now your users won’t be able to view the select ‘View’ dropdown menu
More From pstilgoe
How to autopopulate Infopath fields using Sharepoint list data
By peter.stilgoe
1) Get your Sharepoint list into XML format
2) Set up a data connection using the above XML file as your datasource
3) Now you need to configure rules and filters on your list box. Let’s say that your list box has customer name and you wish to fill a field with the customer phone. When you set your rule, you would first select Set a field’s value then select the field where you want the phone number.
4) To filter for the correct phone number, select the formula button next to the Value field. In the formula window, select Insert Field or Group.
5) Select your secondary data source and the phone number field. Select the Filter Data button. Select Add.
6) In the first drop down, select the customer name field from your secondary data source. Leave the middle one set to Is equal to. For the third drop down, select the field on your form that is bound to the control with the customer name in it.
At this point, what you are basically telling the rule is: Go get me a phone number. I want it to belong to the same customer as the one I just selected in my List Box.
If your datasource is fairly static, when creating the data connection for the XML file in the Data Connection Wizard, ensure that the option to Include the data as a resource file in the form template or template part is selected. This will enhance the speed of your data queries to your datasource significantly.
Steps taken from Hilary Stoupa over @ InfopathDev.com
More From pstilgoe
An error occurred processing the data view. The XslText property is empty
By peter.stilgoe
If you are getting the error:
‘An error occurred processing the data view. The XslText property is empty’
You have probably inserted an extra dataview on your page, check your page & remove the extra data view you accidentally inserted & your error will go away.
More From pstilgoe
Sharepoint Javascript Error: ‘style.display’ is not null or not an object
By peter.stilgoe
If you are receiving the following error when trying to access the ‘edit’ menu of a webpart on a page:
‘style.display’ is not null or not an object
It is likely that you have some random/extra code in another webpart on the page, this typically happens if you cut & paste text from another location onto the page & it also brings over some formatting chars which upsets Sharepoint. Either:
a) Remove the offending text from another webpart on the page
b) Use something other than IE like Firefox or Google Chrome, typically using another web browser you will be able to edit the troublesome webpart.



April 29th, 2010
