Skip to main content

Posts

Creating multiple instances of PWA

There might be cases where you may have to create multiple instances of PWA in the same farm. In this architecture, each instance will reside in their respective web application and it will have it's own Project Server databases and content database. Let us see how can we create second instance in the existing farm.

Cross Field Validation in SharePoint 2010

The requirement is simple. List contains two columns. One column is a drop down with values "Approved" or "Rejected". Another column is Approved Date. If user selects drop down value as Approved, Approved Date should become mandatory. The end result looks like this: As you notice above, when the status is Approved and click on Save button, it prompts a custom message asking user to enter a date. This is achieved with absolutely no code! Here is how you can achieve it. Go to List Settings, navigate to Validation Settings. Under Formula, enter the below code: =IF(AND(Status="Approved",ISBLANK([Approved Date])),FALSE,TRUE) Here Status and Approved Date are column names. Under User Message field, enter any validation text. In my case, it is "If Status is Approved, Approval Date cannot be blank.". Click Save. Now, test this code by entering a new value or changing an existing value. Similarly, one can build complex formula to put c...

How to maintain InfoPath Form Changes or Versions

Sometimes I wonder if InfoPath can be used in a scalable solution. Though I have searched in web for any use cases, I've not seen examples citing InfoPath being used in a scalable deployment. Recently, I too faced a challenge, posted the problem in MSDN forum , but didn't get any solution and then came up with "workaround" to resolve the matter. Considering this could be one of the cases which peple often encounter, I thought of detailing the information in this post. Scenario: 1. Version: SharePoint 2010 and InfoPath 2010. 2. Design an InfoPath form (browser based) and publish it as Farm administrator approved template. 3. Activate this form in a site collection. 4. Add the above form as content type in a document library. 5. Now, it is available for user to fill up the form and save. ----At this point, user has saved the form---- 6. There is a change request for InfoPath form, so go ahead and change the design. 7. Publish again as before. 8. Notice tha...

Publish different InfoPath forms into a single library

Versions used in this article: InfoPath 2010 and SharePoint 2010 Recently, there was a need to use single library to hold multiple InfoPath forms. This was achieved by publishing InfoPath forms as Content Types. Here are simple steps to achieve this. 1.    You need a library which stores forms Content Types. 2.    Publish form as content type. 3.    Add Content type to forms library. 4.    Add different forms using content type. Let me detail it out. 1.    Create a library or use any existing document library to hold the forms content types. 2.    Open InfoPath Designer     a.    Design the form as per your need.     b.    Save the form in your machine.     c.    Go to File->Publish->Select SharePoint Server.     d.    In the wizard, enter your site URL.   ...

How to hide SharePoint List or Document Library

The requirement was to hide certain List or Document Library in a site. The following example shows how can it be done using object model. I would like to bring out some points: When a list is made hidden, it does not appear under "All Site Content" and Quick Launch". However, if user has created an explicit link to the list, it still appears. Also, if a user knows the URL, the hidden list can still be accessed. Item cannot be made hidden with this method. If the requirement is to block user from accessing the list, removing the permission is the ONLY way to achieve it.                     using (SPSite mySite = new SPSite("Site URL"))                     {                       ...

Drag and Drop Outlook Email to SharePoint Library

Recently, I got a question on drag and drop possibility from Outlook to SharePoint Library. This question prompted me to write this post to share details on the topic. Question: After I integrate SharePoint Document Library with Microsoft Outlook, can I drag email from Outlook to Document Library folder within Outlook? Unfortunately the answer is No. For the benefit of the people who are new to the integration, let me explain more on this topic. Suppose you have created a document library in a SharePoint portal. On Library tab, when you click on "Connect to Outlook", a folder gets created in Outlook and data is pulled from Library to your Outlook. Any changes to the contents in the library will get synchronized with Outlook. With this feature enabled, it is obvious for the user to think that if email is dragged and dropped from Inbox to the Library, it should get saved in the SharePoint. But, it does not work! This feature is not available. However, there is a work-around to ...