Wednesday, July 31, 2013

The tool was unable to install Application Server role. Web Server (IIS) role

While installing SharePoint 2013 onto Server 2012, I came across an error as “The tool was unable to install Application Server role. Web Server (IIS) role”. After browsing internet for resolution, I finally could resolve my issue. But while doing my investigation into the error, I came across posts where different people have tried different things to resolve the same error. I will try to collate those and post it in one single post.



Option 1 :
Go to Server Manager and click on Add Roles and Features
Select and expand Web Server (IIS) Role 
Select the IIS 6 Scripting tools under Management Tools within Web Server role
Click Next until the wizard finishes
Rerun the Pre-requisite setup and see if you have been able to resolve the error.

Option 2: (only for Windows 2008 R2)
Go to command prompt and run this command:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i –enable

Option 3:
Run powershell with admin priviledges
Run the following commands: (I mounted my Server 2012 ISO on D drive)

Import-Module ServerManager
Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45
Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer -Source D:\Sources\sxs

Tuesday, July 30, 2013

Using Filters within InfoPath Data connection

I have been asked a number of times by various community members on how to fetch SharePoint list values within the Data connection based on certain condition, so I thought to write a post about it and spread the word.
InfoPath allows us to create data connections and fetch values from any SharePoint list. We can also select which column values we want to select. The data connection will then return all the items within the list, to control which value(s) we want to fetch, we can apply filters.

filters Click on the Dropdown properties and select/add a Data connection. In the Entries field, click the XPath selector button which will enable us to select which column value we want to bind to the dropdown control.


Select the parent node and click on Filter Data... to bring up the filter choices


Click on Add filter option and then you can select your InfoPath controls to create a condition for fetching the values from the list.


Click on Ok and run the form to verify. The list of values will be based on the conditions being set within the filter.

Monday, July 29, 2013

InfoPath dropdown with different Value and Display Name

InfoPath dropdown comes with an ability to have different values being sent to the list/database and a different value to be viewed by users. For eg., you bind a dropdown which fetches users from a SharePoint security group and you want to display the “Display Name” attribute of the user within the dropdown values at the same time you want to map this field to a People picker field within the list and for that purpose you want to send the “Login Name” attribute to the people picker field. In such a scenario, follow the screenshots to create a similar functionality.

Click on the Dropdown properties

Select the datasource from the Data source dropdown or you can create one here as well. Then click on the Select XPath button (highlighted in the image).
In the Entries field, select the parent node and click OK.
This will enable you to select two different values for the Value and the Display Name field.
Now from the returning values, select the ones you want for each field and save your form.
To view your changes, you may want to publish the form and verify the changes.