If you didn't have a chance to attend SharePoint Saturday Houston on April 9 or if you had planned to attend my session at SharePoint Saturday San Antonio on April 2, and were disappointed I was not there (sorry, family emergency), or if you just want to learn more about Office Delve, here's my presentation.
Get-SpSteve
Musings, Tips, and Tricks for SharePoint, InfoPath, Nintex and anything else I feel like posting ...
Wednesday, April 20, 2016
Thursday, October 29, 2015
SharePoint TechFest Houston 2015 and Working with Large Lists in SharePoint 2013
The organizers of SharePoint TechFest Houston (#HoustonSPTF ) held Oct. 24, 2015 at the Reliant Center, did a great job of putting together a fantastic event. I love to learn new things and I found the presentations I attended on "Creating a Great User Experience in SharePoint" by MVP Marc Anderson (Marc Anderson's Blog) and "Self-Service Business Intelligence for On-Prem Organizations" by my friend, Theresa Eller (Theresa Eller's Blog - SharePoint Madam) really did the trick for me. I also want to thank all the speakers whose presentations I wasn't able to attend. Some of them posted their presentations on the event site The house was packed and I heard nothing but good things from the attendees I talked to.
This year, I also had the pleasure of being one of the presenters at SharePoint TechFest. This is only my third SharePoint public speaking engagement and my audience on Tuesday was the largest yet with all the seats filled and some people standing along the wall in the back. I want to thank all the attendees for baring with me through a few rough patches and not throwing things when I whipped through a couple of my slides with lightning speed. Over the next few weeks, I plan to blog more in-depth on some of the topics I covered, but for now, I'm posting the slides from my presentation.
Also, if you missed my talk at TechFest, I'll be presenting it again with some new material at the Houston SharePoint User Group meeting (H-SPUG) on Nov. 18, 2015.
This year, I also had the pleasure of being one of the presenters at SharePoint TechFest. This is only my third SharePoint public speaking engagement and my audience on Tuesday was the largest yet with all the seats filled and some people standing along the wall in the back. I want to thank all the attendees for baring with me through a few rough patches and not throwing things when I whipped through a couple of my slides with lightning speed. Over the next few weeks, I plan to blog more in-depth on some of the topics I covered, but for now, I'm posting the slides from my presentation.
Also, if you missed my talk at TechFest, I'll be presenting it again with some new material at the Houston SharePoint User Group meeting (H-SPUG) on Nov. 18, 2015.
Thursday, September 17, 2015
Customize a Content Query Web Part in SharePoint 2013
A Content Query Web Part (CQWP) can be used to rollup
information from other locations within the same site collection. For example,
you can use this web part to display list items from a list in a sub-site that
is a sibling of the current site. Or, you could use it to display all calendar
items from sites within the site collection. Out-of-the-box, this web part
includes several preconfigured views and formatting options. But, what happens
when you need to customize how information is displayed? This article walks you
through the steps of customizing the CQWP web part to add additional list
fields and labels to the web part output.
1.
Start by creating a new page and adding the CQWP
web part to the page.
2.
Next, from the web part menu, select Export … and save the web part to your
desktop.
3.
Use your favorite text editor to open the
exported web part file and find the following line:
<property name="ItemXslLink" type="string" />
And change it to:
<property name="ItemXslLink" type="string">/<path>/Style
Library/XSL Style Sheets/CustomItemStyle.xsl</property>
(The URL is the relative path to the XSL
Style Sheets directory in the Style Library at the root of the site collection
parent.)
4.
Save the file.
5.
Delete the existing web part from your page and
upload the new custom web part by selecting Upload a Web Part and then clicking the Upload button.
6.
The customized web part will appear under Imported Web Parts. Add the new custom
web part to the page.
7.
The next step is to create a custom style sheet
to add extra slots to the web part. To do this, open the site collection parent
in SharePoint Designer and navigate to All
Files>Style Library>XSL Style Sheets.
8.
Create a copy of the ItemStyle.xsl stylesheet
and rename it CustomItemStyle.xsl
(this is the name we assigned in Step 3).
9.
Check out the CustomItemStyle.xsl and open it as
XML from SharePoint Designer. There are several different styles preconfigured
in the web part. Determine which style is most similar to the look and feel you
wish to achieve and then look for the name in the xsl:template name tag. Most of the names are similar to the menu
options under item style in the CQWP
Presentation section. In this example, I will copy the Title and Description template, which is named “NoImage”. (I know? Right? This makes no sense. But, here’s a hint,
the templates in the style sheet appear in the same order as the choices on the
web part menu).
10.
Now, copy everything between the <xsl:template></xsl:template> tags
and paste it after <xsl:template>.
We will now modify the copied template section to add a new Item Style option
to the web part menu and to add “slots” to the Fields to Display section of the web part.
11.
Find the following line in the copied section:
<xsl:template name="NoImage" match="Row[@Style='NoImage']" mode="itemstyle">
<xsl:template name="NoImage" match="Row[@Style='NoImage']" mode="itemstyle">
12.
Replace NoImage
with “Custom” so that your new
line looks like this:
<xsl:template name="Custom" match="Row[@Style='Custom']" mode="itemstyle">.
<xsl:template name="Custom" match="Row[@Style='Custom']" mode="itemstyle">.
13.
Now, we are going to add slots to the Fields to Display area. Copy the Div
class for description and paste it under the </div> closing tag.
<div class="description">
<xsl:value-of select="@Description" />
</div>
14.
Repeat step 13 for each additional slot that is
to be added.
15.
Next, update each class and each value-of
select value to a unique name. In this example, we will create four slots
and name them Custom1, Custom2, Custom3, and Custom 4. Each Div section will
look something like this:
<div class="Custom1"><xsl:value-of
select="@Custom1"
/>
</div>
16.
Now we will add some labels to the slots we
created so that the data is displayed in a way that is appealing to the eye. First
enclose the Div tags that will include labels in <p> tags. Then, after
the <div class=”Custom1”> tag, add a custom label with html formatting:
<p>
<div class="Custom1"><b>Priority: </b><xsl:value-of select="@Custom1" />
</div>
</p>
<div class="Custom1"><b>Priority: </b><xsl:value-of select="@Custom1" />
</div>
</p>
17.
After you have completed adding all the labels
you need, your code should look something like this:
<xsl:template name="Custom"
match="Row[@Style='Custom']" mode="itemstyle">
<xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName"
select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title"
select="@Title"/>
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<div class="item link-item">
<xsl:call-template
name="OuterTemplate.CallPresenceStatusIconTemplate"/>
<a href="{$SafeLinkUrl}"
title="{@LinkToolTip}">
<xsl:if
test="$ItemsHaveStreams = 'True'">
<xsl:attribute name="onclick">
<xsl:value-of select="@OnClickForWebRendering"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="$ItemsHaveStreams != 'True' and @OpenInNewWindow
= 'True'">
<xsl:attribute name="onclick">
<xsl:value-of disable-output-escaping="yes"
select="$OnClickTargetAttribute"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$DisplayTitle"/>
</a>
<p>
<div class="description">
<b>Description: </b><xsl:value-of
select="@Description" />
</div>
<div class="Custom 1">
<b>Priority: </b><xsl:value-of
select="@Custom1" />
</div>
<div class="Custom 2">
<b>Owning Application: </b> <xsl:value-of
select="@Custom2" />
</div>
<div class="Custom 3">
<b>Reporting Tool: </b> <xsl:value-of
select="@Custom3" />
</div>
<div
class="Custom 4">
<xsl:value-of select="@Custom4" />
</div>
</p>
</div>
</xsl:template>
|
18.
Save the file and check it in.
19.
Now return to the page where you added the CQWP
and refresh the page. Next, edit the web part. The new template should appear
on the list of Item Styles and the new slots should be in the Fields to Display
section.
20.
Select the new Custom template from the Item Style menu and then add the internal
field name of each field you wish to display followed by a semi-colon in the
new custom field slots.
21.
Set other formatting options as desired, then
click Apply and OK.
22.
In the following screenshot, items were queried
from a list in a sibling site to the current site. Presentation was set to
group items by the “Report Repository
ID” field and items were sorted by Created
date. The Banded Group Style was
selected and the Custom Item Style
was selected. The built in Title and Description slots were used and three
custom columns were populated in the new slots added to the style sheet.
Labels:
Content Query Web Part,
CQWP,
css,
customize,
development,
MOSS 2007,
SharePoint,
SharePoint 2010,
SharePoint 2013,
SharePoint Designer,
style sheet,
web parts,
WSS 3.0,
xsl
Friday, April 24, 2015
Create a Custom Service Connection Group for a SharePoint 2013 Web Application
In my last post, I explained how to add items to the default service connection group (Application Proxy Group) for a web application by using PowerShell. I also described how to use the [custom] group to create application proxy group specific to a single web application. In this post, I'll walk you through the process for creating a custom service connection group that can be reused for multiple web applications. For example, you might want to have a Projects Group in addition to the default connection group.You can create this group easily using PowerShell by following these steps:
- Run the SharePoint 2013 Management Shell as an administrator.
- Create the new service connection group using the following PowerShell:
$New = New-SpServiceApplicationProxyGroup -Name "My New Group"
- Next, get a list of the current service application proxies:
Get-SpServiceApplicationProxy | Select DisplayName,Id
- Copy the Id of each service application proxy that you want to include in your new connection group and add it to a text file with the values separated by commas.
- Now add the comma separated list of proxies as members to your new group (where $New is the name of your connection group):
Add-SpServiceApplicationProxyGroupMember $New -Member <Your list of comma separated Ids>
- Your connection group is now added in Central Administration and can be assigned as desired.
Remember, you can remove connection group members by using:
Remove-SpServiceApplicationProxyGroupMember $New -Member <Your list of comma separated Ids>
And, you can remove service connection groups using:
Remove-SpServiceApplicationProxyGroup -Name "<friendly name in quotes or id of your group"
Both of these command require confirmation before executing.
Wednesday, April 22, 2015
Modify the Default Service Connection Group for a SharePoint 2013 Web Application
A sometimes overlooked features of SharePoint 2013 is the ability to create custom Service Application Proxy Groups for individual web applications. You can use this functionality to specify which of your service applications will be available for each of your web applications. For example, you might want to have two search service applications with different configurations and make one service application only open to your external facing web application and the other available to all your other web applications.From Central Administration, you can see the connection groups under the web application settings (Application Management>Web Applications>Manage Web Applications) by selecting a web application and clicking Service Connections from the ribbon. Out-of-the-box, you will see that a single instance of each service application you have created has been checked and added to the default connection group.
You will notice that you are not able to change the members of the default proxy group using the Central Administration GUI, but you can select [custom] from the dropdown menu at the top of the window and create a custom proxy group for your web application. You can also use PowerShell to create additional custom proxy groups (more on this in my next post). But, what happens if you want to change the default group?
The default proxy group cannot be changed through the Central Administration GUI, you need to use PowerShell.
Follow these steps to add a member to the default group:
1) Run SharePoint 2013 Management Shell as an administrator
2) Get the default service application proxy group and store it in a variable:
$defprox = Get-SPServiceApplicationProxyGroup -default
3) Get the service application proxy that you want to add to or remove from the default group and store it in a variable. Note, the name in the where statement is the name of the service application proxy that can be found in Central Administration under Application Management>Service Applications>Manage Service Applications or by running Get-SpServiceApplicationProxy from PowerShell:
$newsearch = get-SpServiceApplicationProxy | where {$_.displayname -eq "Search15 Proxy"}
4) To add a member to the default group, run this command:
Add-SPServiceApplicationProxyGroupMember $defprox -Member $newsearch.id
5) To remove a member from the default group, run this command and confirm the removal when prompted:
Remove-SPServiceApplicationProxyGroupMember $defprox -Member $newsearch.id
6) Multiple proxy members can be added or removed from a group by adding them to the -Member property separated by commas, for example:
Add-SPServiceApplicationProxyGroupMember $defprox -Member $newsearch.id, $search.id, $access.id
You can check your results by reopening the Service Connections window in Central Administration. You should see the proxy groups you added with a check in the checkbox next to the item. Items that have been removed will be unchecked.
Sunday, April 5, 2015
Remove Access App Icon From Site Contents After Failed Installation
Recently a user on one of our SharePoint 2013 sites attempted to create an Access 2013 App on their team site and the installation failed because Access 2013 Apps had not been configured on the farm (more on configuring Access in a future blog). Annoyingly, after the failure the grayed out installation icon remained with an intimidating "Sorry, something went wrong with adding the app. Click to retry." message.
Fixing this issue is quite simple using PowerShell. Follow these steps:
- Logon to your SharePoint application server.
- Run the SharePoint 2013 Management Shell as an administrator.
- Run the following commands to identify the GUID of the instance that needs to be deleted.
Get-SPAppInstance -Web <Put your SharePoint site URL here> | select title,id
- This will provide you with a list of app instances that looks something like this:
- Identify your app and copy its ID.
- Then run the following script:
$instance = Get-SPAppInstance -web <YOUR SITE URL> |where {$_.id -eq "YOUR APP INSTANCE ID IN QUOTES"}
$instance.uninstall()
- If the app was uninstalled successfully, you will see the response below in PowerShell and the grayed out icon will disappear from your site contents page.
Thursday, March 19, 2015
Automatically Add Row Numbers to InfoPath 2013 Repeating Table
This happens to be my first blog post and I had envisioned that it would be a little more substantial, but if I keep waiting for that great inspiration, this page will be blank well after the next zombie apocalypse. So, without further adieu ...
Did you ever want to automatically add a row number to a repeating table in InfoPath? It's actually incredibly easy.
Follow these steps:
Add a repeating table to your form.
Right-click the calculated value field and select properties, then change the XPath value to position() by typing directly into the formula field. Then click Apply and OK.
You must type the value directly into the XPath formula field. If you click the formula button and add the position() function you will receive a warning that "Functions position() and last() are not supported, and InfoPath will not let you save the formula.
When your done, you'll see line numbers automatically appear next to each new row you add to your table.
Subscribe to:
Posts (Atom)