Thursday, January 15, 2026

SharePoint List Power App Form: Save Multiple Edit Forms Simultaneously

When using a custom Power App form integrated with a SharePoint list, and the Power App form contains multiple edit forms (e.g. SharePointForm1, Form1, Form2), you may encounter an issue of the SubmitForm function not effectively saving all edit forms at once, especially when used within the OnSave property. 

Here are few examples that have not worked for me at all.

SubmitForm(SharePointForm1);
SubmitForm(Form1);
SubmitForm(Form2)

and

SubmitForm(SharePointForm1) && SubmitForm(Form1) && SubmitForm(Form2)

The solution for me was to use the Patch function instead. See example below.

Patch('List Name',LookUp('List Name',ID=SharePointIntegration.Selected.ID),
SharePointForm1.Updates, Form1.Updates, Form2.Updates);RequestHide()

Hope this helps!

Monday, March 25, 2024

Custom Power App Forms in SharePoint Online: 'Start Date and Time' and 'End Date and Time' Validation on Submit

Customizing a SharePoint list form in Power Apps and need to ensure a 'Start Date and Time' field is always earlier than its corresponding 'End Date and Time' field? See steps below. Note that I am using a Submit button for validation.

1)  Identify the data card values for your 'Start Date and Time' and 'End Date and Time' fields within your custom Power App form. The start date and time values for my solution were DateValue1HourValue1, and MinuteValue1, and the end date and time values for my solution were DateValue2, HourValue2, and MinuteValue2.

2)  Next, add a Submit button to your form. For the OnSelect property of the Submit button, enter the following If statement in the formula bar. Be sure to match the DateValue, HourValue, and MinuteValue with your data card values from Step 1.

If(DateValue2.SelectedDate + Time(Value(HourValue2.Selected.Value), Value(MinuteValue2.Selected.Value), 0) < DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0), Notify("End Date and Time cannot be earlier than the Start Date and Time", NotificationType.Error),SubmitForm( SharePointForm1 ))

3)  Save and Publish the Power App form.

Monday, January 29, 2024

Prevent duplicate reservations on a SharePoint Calendar using Power Automate

When building an asset reservation system in SharePoint Online, you may have a need to prevent duplicate reservations on a SharePoint calendar. There are several popular solutions for this requirement, but I prefer to use Power Automate with the 'Get Items' action and a filter query. 

Most reservation systems I have seen in SharePoint today basically use two lists -- one for capturing each reservation request and another list for the reservation calendar. Each request form submission triggers a Power Automate flow that uses the 'Get Items' action with a filter query to check existing items on the reservation calendar that contain the same values for one or more columns submitted in each request, before scheduling the new request. 

I initially struggled with defining the appropriate logic for the 'Get Items' filter query, but I eventually determined the key point to remember is the fact that each new request will always have a start and end date. Therefore, the filter query only needs to retrieve the existing calendar items that currently exist BETWEEN the proposed start and end dates of each new request. Here is the formula I recommend for the 'Get Items' filter query.

StartDateandTime (from Calendar) le (less than or equal to) Return Date (from Request) AND EndDateandTime (from Calendar) ge (greater than or equal to) Departure Date (from Request)

Of course, the next step in the flow (after the Get Items action) should be a Condition that uses an expression to see if the output of the previous 'Get Items' action contains one or more existing items in the calendar list. See below. If there are any duplicate items identified, you can then define the next action in your flow.

length(outputs('Get_items')?['body/value']) 'is greater than or equal to' 1

Hope this helps anyone looking to prevent duplicate items on a SharePoint calendar.

Tuesday, May 11, 2021

SharePoint Modern Page: Site Collections Directory

Adding a site collection directory to a SharePoint classic page was easy. However, with the new modern pages in SharePoint, it has become more challenging. A quick, easy way I have found to accomplish this need is to use the Highlighted Content web part and a custom query. See below for details.

1. Add the Highlighted Content web part on the page where you want the site collection directory.

2. Edit the Highlighted Content web part, select 'Custom query', select 'All sites' for the Source, and then add the following custom query in the 'Query text (KQL)' box: Path:"https://tenant.sharepoint.com/sites/*" contentclass:STS_Site. See screenshot below for an example. To sort the results on the page, you are given the option to use a managed property to sort on. As you can see in the screenshot below, I searched for the term "string", and ultimately selected the 'RefinableString00" managed property, which sorted my site collections by site name.



3. Republish the page.

Thursday, February 25, 2021

Restore a deleted site collection (SharePoint 2010 / 2013 / 2016 / 2019 On-Premises)

Did you know that you can now restore a deleted site collection? Microsoft has issued two PowerShell commands for this need. The only caveat is that they only work in an on-premises farm. I tested both commands recently, and I can tell you firsthand that they work!

Get-SPDeletedSite: Gets a list of deleted site collections.

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/get-spdeletedsite?view=sharepoint-ps

Restore-SPDeletedSite: Restores a deleted site collection.

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/restore-spdeletedsite?view=sharepoint-ps

Friday, August 28, 2020

Item-Level Permissions in SharePoint Online using Power Automate

As you fellow SharePoint gurus already know, SharePoint 2010 Workflows will be retired this year. This of course also means that we will eventually lose the all important 'Replace List Item Permissions' action in SharePoint Designer, which essentially gave us the ability to implement automated item-level permissions for a SharePoint library or list. I recently took the time over a weekend to evaluate any good alternative (non 3rd party) solutions that I could think of, and it appears that Power Automate is now the best way to go. However, there is one drawback to this new approach -- you can only assign Edit or Read level permissions to any given item in a SharePoint library or list.

1. Go to the Power Automate site, which at the time of this article is located at https://us.flow.microsoft.com/en-us. Be sure to login.

2. Create a new automated blank flow using the 'When an item is created' SharePoint trigger.

3. Add the remaining logic as shown in the screenshot below.

NOTES:  1) The ID is available in the dynamic content section that appears once you click inside the 'Id' field in your flow.  2) I also used the dynamic content section for the Recipients, but you can manually type in email addresses as long as you separate them with a semicolon.



Monday, June 22, 2020

SharePoint Online Wiki Homepage: Change Top Suite Bar Color (CSS)

To change the color of the top suite bar on a SharePoint Online Wiki homepage, add a Script Editor web part to the page and add the following CSS code:

#suiteBarTop, #O365_NavHeader, #O365_AppName, #O365_MainLink_NavMenu, #O365_MainLink_Bell, #O365_MainLink_Settings, #O365_MainLink_Help, #O365_MainLink_Me  

{

background: #0078d4 !important;

}

That's it. Enjoy.

Wednesday, June 3, 2020

SharePoint Roles are Business Roles, Not IT Roles

SharePoint is a platform for BUSINESS SOLUTIONS. Without business purpose, SharePoint is worthless. And because SharePoint professionals work so closely with the core areas of business (accounting, business development, finance, operations, etc.), I wholeheartedly believe SharePoint roles are business roles, not IT roles.

Just a little 'food for thought' for the next time you are planning to hire a SharePoint professional.

That is all for this post.

Tuesday, April 14, 2020

Quick Tip: Add 'Find a file' search box to Document Library Web Part

Another Quick Tip:

To add the 'Find a file' search box to a document library web part on a page, simply edit the web part, expand the Miscellaneous section, and select the checkbox to "Display search box". That's it.


If only Microsoft made everything that easy! :)

Have a great day.

Lesson Learned: Three-state workflow feature is the IssueTrackingWorkflow feature

Recently I had an issue in which I could not deploy a new solution to a SharePoint 2016 on-premises site collection due to a dependent feature not being activated: the IssueTrackingWorkflow feature, which has a GUID of "fde5d850-671e-4143-950a-87b473922dc7". After a few hours of research, I discovered that this feature is actually the "Three-state workflow" site collection feature. After activating this feature on the site collection, I was able to successfully deploy the new solution without any issues. Here are few tips:

To see if a site collection feature is activated, here is the PowerShell script:

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$featureGuid = "fde5d850-671e-4143-950a-87b473922dc7"
$site = Get-SPSite http://SiteCollectionUrl
$feature = $site.Features[$featureGuid]
if ($feature -eq $null) { "feature not activated" } else { "feature activated" }

To active the site collection feature in PowerShell:

$site = Get-SPSite http://SiteCollectionUrl
$site | Get-SPSite -limit all | ForEach-Object {Enable-SPFeature -Identity "fde5d850-671e-4143-950a-87b473922dc7" -Url $_.Url}
$site.Dispose()

Done.

Tuesday, August 13, 2019

SharePoint Online: Cannot create a new classic site collection

Today I ran into an issue in SharePoint Online in which I could not create a new site collection using one of the classic templates. The SharePoint Administration Center allowed me to perform the steps to create the new site collection (many times, actually), but it never would actually provision it. After a bit of troubleshooting, I realized that I had initially created the new site collection using the modern experience, and I immediately deleted it. I then discovered that by default, SharePoint Online now temporarily holds deleted sites under an area named 'Deleted Sites,' and the only way to permanently delete the site collection is to run the following command in the SharePoint Online Management Shell.

Remove-SPODeletedSite -Identity https://company.sharepoint.com/sites/sitecollection

After running this command, the site collection is permanently deleted, and the URL suffix (alias) is now available for you to use again for your new classic site collection.

Have a great day.

Tuesday, November 6, 2018

SharePoint Online External Sharing on Subsites: "Your organization's policies don't allow you to share with these users. Go to External Sharing in the Office 365 admin center to enable it."

Scenario: You enable external sharing for a site collection in SharePoint Online. You notice that you can share externally on the parent site, but not any of its subsites.

Solution: You simply need to deactivate the 'Limited-access user permission lockdown mode' site collection feature, as shown in the screenshot below.


That is all.

Monday, August 20, 2018

Content Search Web Part: Open Links in New Tab

Just a quick post on how to configure a Content Search Web Part to open links in a new tab. See steps below.

1. Using SharePoint Designer, copy an existing item display template in order to create your own custom item display template (Site Settings > Master pages and layouts > Display Templates > Content Web Parts). For my needs, I usually copy the Item_TwoLines.html file. NOTE: You only need to copy the HTML file, not the JavaScript file (.js file) associated with the HTML file.

2. Edit the properties of your copied HTML file and give it a unique Name, Title, and Description.

3. Using SharePoint Designer, check-out your new HTML file, and edit it. Find the line of code as shown below, and add target="_blank".



4. Save the file, check it in, and publish it.
5. Edit your Content Search Web Part. Under the 'Display Templates' section, select the title of your custom item display template in the Item drop-down menu, and select the OK button to save your web part configuration.

Links should now open in a new tab.

Tuesday, June 26, 2018

SharePoint Online: Automating Document Set File Template Revisions with Microsoft Flow

Managing the file templates associated with a Document Set content type can be tedious process, especially when the source files are regularly modified in a document library outside of the Document Set content type. To perform this operation manually, you first need to download a copy of each modified template, and then upload them to the 'Default Content' section under Library Settings > Content Type Name > Document Set settings. In this blog post, I am going to provide the steps needed to automate this task using Microsoft Flow.

1. Using a blank flow, begin with the following trigger. Add your site address, select your Library Name, and leave the Folder field blank if you want the flow to look at the entire library.







2. Add a condition and configure it so that the flow can find the file templates to be overwritten. See the syntax below. Template1Name represents the name of the first document set template, and so on. In this example, there are three file templates in the document set content type.
@or(contains(triggerBody()?['{Name}'], 'Template1Name'), contains(triggerBody()?['{Name}'], 'Template2Name'), contains(triggerBody()?['{Name}'], 'Template3Name'))

3. For the Yes section of the condition, add the 'Copy file' SharePoint action to the flow. See the screenshot below for further details. I am using the 'File name with Extension' dynamic content item in both Source and Destination fields. NOTE: The Destination File Path is pointing to the content type location. You should be able use Windows Explorer and browse to this location manually. So, if you run into any issues with this path, you can test to see if you can view in Windows Explorer.










4. For the No section of the condition, you can simply leave it blank if you only have one content type. If you have multiple content types for which you need to automate the document set file templates, you will need to add another condition under the No part with its own set of Yes/No sections, and configure it similar to steps 2 and 3 above.







Hope this helps make your SharePoint life better!

Wednesday, November 8, 2017

Hide the "Follow" link on the hover panel for people search results

I had a request recently to hide the "Follow" link shown on the hover panel for people search results. Upon trying a number of different ideas, I found the easiest way to accomplish this task is to modify the display template associated with this functionality. See steps below.

1. At your search center site, go to Site Settings, and click on Master pages and page layouts under the Web Designer Galleries section.

2. Click on Display Templates > Search, and find the Item_Person_HoverPanel.html file. Download a copy of this file to your desktop.

3. Edit the file in notepad, and comment out the following line.

<div class="ms-calloutLink ms-uppercase" id="_#= followId =#_"></div>

My blog posts have been few and far between lately as I have been super busy pursuing an MBA at my dream school - Notre Dame. After finishing, I will post more!

Friday, March 3, 2017

Content Search Web Part: Subsites not sorting correctly

If you are one of many using the Content Search web part to display all subsites of a parent site, and the sorting by Site title is not working as expected, use the following tips to get it working correctly.

1) Use one of the refinable string managed properties and map it to the 'ows_SiteName' crawled property. I used the RefinableString00 managed property.

2) Create a new Result Source on the parent site. Site Settings > Results Sources (under Search). Create a New Result Source. Give it an appropriate name, scroll down, and click the 'Launch Query Builder' button. In the Query text box, add your query as needed. I used "path:"https://company.sharepoint.com/sites/sitename" contentclass:STS_Web  UrlDepth=3" to show the first level of subsites on my parent site. Next, click the SORTING tab, and select your refinable string managed property. Select the OK button.

3) In the Content Search web part query, click the link to 'Switch to Advanced Mode'. Select your newly created Results Source in the drop-down, and clear the Query text box. Select the OK button.

4) If your subsites are still not sorting correctly in the web part, try re-indexing them. On each subsite, go to Site Settings > Search and offline availability (under Search). Click the 'Reindex Site' button.

Tuesday, June 21, 2016

SharePoint Online: Some CSS Tidbits

For this post, I just wanted to pass along some CSS tidbits I have been using lately on SharePoint Online sites. See below. I have also included a brief explanation in parenthesis next to each comment. Hope you find these helpful.

/* Hide Global Navigation */ (Hide the global, or top level, navigation bar)
#zz11_TopNavigationMenu {
display: none !important;
}
#zz12_TopNavigationMenu {
display: none !important;
}
/* Hide Page Title */ (Hide the page title next to the site logo)
#pageTitle {
display:none;
}
/* Header Banner */ (Use an image to act as the site header banner, and size it as needed)
#s4-titlerow {
background-image: url('/sites/sitename/PublishingImages/image.jpg') !important;
    width: 100% !important;
    height: 53px !important;
    background-repeat: repeat !important;
    }
/* Site Logo Size */ (Increase the size of the logo on the site)
.ms-siteicon-img {
max-width: 281px;
max-height: 60px;
}
/* Search Bar */ (Change the background color of the search bar on the site)
.ms-srch-sb {
background-color: white;
}
/* Web Part Headers */ (Change the background color of the web part headers, and the font size, color, and weight (bold) of the web part titles)
.ms-webpart-titleText.ms-webpart-titleText, .ms-webpart-titleText > a {  
background-color: #BEBEBE;
font-size: 18px;        
font-weight: bold;      
color: #0072c6;        
padding: 5px 5px;    
}

Note: I recommend you use these styles in an external style sheet on your site and reference it in your master page.

Thursday, May 5, 2016

The Future of SharePoint: Brighter than Ever!

The SharePoint team at Microsoft has announced some of the new capabilities coming very soon to SharePoint, particularly around OneDrive, Mobile, and Office 365. So far, it looks amazing! Really excited about the future of SharePoint. See link below for article.

Tuesday, April 5, 2016

SharePoint 2013 Workflow: Open task form in edit mode when using 'Start a task process' action

When using the 'Start a task process' action in a SharePoint Designer 2013 Workflow, you can create a hyperlink within the email notification body to allow each task to be opened in edit mode by default. Just follow these steps:

1) Implement each step outlined in the "2013 Workflow Task Links Redirect to Edit Form" blog post, by Robyn Courchane.

2) In SharePoint Designer 2013, under the Email Options for your 'Start a task process' action, click the button to open the email editor. By default, the task item hyperlink points to the [%Task: Title%] address, which opens the task item form in display mode. All you have to do is change [%Task: Title%] to [%Task: URL%], as shown in the screenshot below.












3) Select the OK button twice. The hyperlink configuration should now look like the following screenshot.








Save and publish your SharePoint 2013 Workflow. Now, when users receive an email notification issued by the 'Start a task process" action, the task item hyperlink will take them directly to edit mode.

Tuesday, November 3, 2015

SharePoint 2013: PowerShell to change site logo for all site collections/sites within a particular Web Application

Quick Post: You can use PowerShell in SharePoint 2013 to change the site logo for all site collections and sites within a particular web application. Copy/paste the following into a text file and rename it with a .ps1 extension.