Skip to main content

Posts

Filtering SharePoint List Data using Infopath 2010

I could have just added the Account field to the Custom List data source (and I did that, from Tools > Data Connections ) and used that instead of the Name field, but people usually don't know their managers' account names. I did a little digging and found an MSDN forum post that gave me a great way to let users pick friendly display names, which InfoPath would then use to populate a hidden form field with the corresponding account name Add a Text Box field to the InfoPath form ( Insert > Text Box ). Right-click the text box and choose Text Box Properties . On the Data tab , click the Function ( fx ) button in the Default Value section. Click the Insert Field or Group ... button. In the Data source drop-down list, select  Your Custom List . Expand the folders until you see the fields in the User Information List. Click the : Account field (you did add it from Tools > Data Connections > Modify , right?), and then click Filter Data . In the Filter...

Populating an InfoPath Drop-Down List Box with Choices from a SharePoint List

What if the names people type in the Name text boxes provided by that sample InfoPath expense report form don't match names of actual users in SharePoint? My workflow needed real names to work, so now what? Well, InfoPath has an answer for that, and it's called Look up values from an external data source , which is an option in the Data tab of the field's Properties. This lets you populate a drop-down list box with values from a SharePoint list, such as the User Information List (which is what I used). Here's how: First, right-click the Text Box field that holds the name, and choose Change To > Drop-Down List Box . Right-click on the form field and choose Drop-Down List Properties . In the Data tab, click Look up values from an external data source , and then click Add. In the Data Connection Wizard, click Create a new connection to : Receive data , and then click Next . Select the option to receive data from a SharePoint library or list , and then click ...

Differences between Main Vs.Secondary Data Sources in Infopath

This article explains the difference between the Main and secondary data sources and shows you how to programmatically retrieve a reference to the Main data source or to a secondary data source. Introduction to data sources InfoPath offers two types of data sources: Main and secondary . An InfoPath form template always contains one Main data source and can contain zero or more secondary data sources. The difference between the Main and secondary data sources The Main data source of a form contains the data that you want to permanently store when you save the form. A secondary data source on the other hand, is a temporary storage location for data that is external to the form. Such data typically lives outside the form in databases, XML files, SharePoint lists or libraries, or can be retrieved from web services. When you save a form, the data in the secondary data sources of the form is never saved in the form. This is an important fact to remember when you design InfoPath for...

Drop Down Filters in Sharepoint 2010

 To customize list item forms in SharePoint 2010 using InfoPath. The ability to filter drop down list choices based on a previous selection in the form. This Video shows how to customize the new item form in InfoPath, wire up drop down choice lists to information in a SharePoint list and filter and have the choices in one drop down filter the choices in the next. The facilities department is responsible for equipment in offices, manufacturing and retail sales locations in thirty or more buildings located in about a dozen cities in three states.  This solution gives users the choice of picking directly from the entire list of buildings or filtering first by state and city (see screenshot above). The video below will walk you through the entire process from creating a custom list, adding a lookup column that pulls back multiple columns of meta data, customizing the list item form in InfoPath and wiring up the optional cascading filtered drop down choice fields Click ...

Could not find Feature S2SiteAdmin, While Importing sites from Different Server at SharePoint

SharePoint’s Stsadm -o Import is a Powerful Command line Functionality that we use for importing site . Import option is very helpful and fast but can be tricky sometime. I had an issue while importing site from different server which I would like to explain below. Scenario- I  was working on a SharePoint Intranet Development. After finishing Development work I was moving sites to the UAT environment for testing. While using Stsadm -o import I got a huge error saying “FatalError: Could not find Feature S2SiteAdmin”. Steps I have done: I took help from my Google buddy and got few blogs regarding the issue I have faced. That’s where it gets tricky. It is very important to fine the exact reason for the issue to solve it faster. I have taken following step by step approach- Make sure both the server have same version. You might need to install “ Infrastructure Update for Microsoft Office Servers (KB951297) ”. It can be downloaded here. ( http://www.microsoft.com/downloads/...

Adding Filters to SharePoint 2010 Wiki Pages

I wanted to add a Choice Filter to my team site and couldn’t.   In SharePoint 2010, when creating a Team Site, wiki pages are used for the home page as well as any other pages you create .   If you edit the page and try to add a Choice Filter (as well as some of the other filters), nothing appears to be added to the page.  However, if you were to open the page in SharePoint Designer, you will see that the web part has in face been added to the page and is actually throwing and error. So what is the solution?  There are actually two of them. 1.   Active the Publishing Feature for you site , create a Web Part Page, and use this page to add web parts to and utilize filters. But..what if I don’t want to turn on publishing or I want to be able to use a wiki page? 2. Use SharePoint Designer to insert the filter web part .  That’s right, you can actually open a wiki page in SharePoint designer, insert your desired filter web part there and configure the ...

Remove the Scroll Bar from a Custom SharePoint Web Part

Normally this should be pretty straight forward.  However, today I had a custom Silverlight web part that had the vertical scroll bar appear whenever I set it to a fixed height.  It wasn't that the content was too large for the fix height, it just felt I needed the scroll bar and no matter how large I set the height, it still appeared.  The fix to removing the scroll bar is to add the CSS: # ctl00_m_g_4d68d6ac_9970_465f_8541_e7a54d4ae37b {overflow: hidden !important;} That's all fine and dandy except for the fact that this ID changes every time you add a web part to the site.  So if this is a web part you are going to allow others to add or deliver to a client, you don't want to manually have to add the CSS every time a new web part gets added.  So, my work around was adding the following code to the code behind for my web part. Where the T itle.Contains("[Title"]) is the title that is assigned to the web part rather than the "Display Title " wh...

Web 2.0 Tools in Sharepoint 2010

One of the goals in SharePoint 2010 was to make it easier for users to update their information and pages without lots of postbacks, clicking, and delays . Accordingly, Microsoft has invested a lot in improving the web user interface. One way they have done this is by adding the Office Ribbon concept to SharePoint . I think this has to be a first for a web application, and to be honest while I saw the value in Office 2007, I wasn’t sold on it for a web interface. The other major investment Microsoft made is adding AJAX . This is  no-brainer and a hands-down winner for me. Let’s imagine you want to modify a team site: Step 1 : You are in the Browse tab of the Ribbon – choose the Edit Tab . To Edit, click “ Edit ” which is one of the buttons on the Edit tab. Then click on the area of the page you want, type some text in, and click Stop Editing . Well, not so far, but there weren’t any postbacks, so overall I think there’s some time saving here. An important benefit f...

Specify How Items in a View Are Grouped in Sharepoint 2010

SharePoint list views support a feature called  grouping  that enables you to define a grouping on a column in a list view. For example, grouping contacts by the company to which they belong is a common use of grouping. Grouping documents by the person who created them can be another good idea (see  Figure 1 ). Figure 1. A view of a document library grouping files by the Created By column Note Grouping is available only for standard and Gantt view types. To take advantage of grouping, select the column whose values you want to use as groups. If there are empty values in the selected column for some of the items or files in that view, they are placed under a group without a name (see Figure 2 ). Figure 2. A view of a contacts list, grouped by the Company column, where one contact doesn’t have a value in the Company column To define the grouping when creating a view , scroll down to the Group By section in the page and expand it by using the plus (+) sign ...

Create Mobile Views in Sharepoint 2010

It is often a good idea to create special views that show information in a more compact way to enable mobile device users to see that information more clearly and to more comfortably navigate in it.Figure 1 Figure 1. A mobile view for an announcement list is designed to be more user friendly for mobile device users SharePoint attempts to identify whether a device is a mobile device and then switches to a default mobile view that is optimized for that purpose. Nonmobile devices see the view as if it is a regular view. Each mobile view has a special URL that the mobile device is redirected to. To specify that a view should have a mobile URL, scroll to the Mobile section in the view creation page and expand it by using the plus sign next to the section title. You can create a view and specify it to be the default mobile view for the list (see Figure 2 ), or you can just leave it as another new view in the list. Figure 2. Creating a mobile view. Additional options you can set f...