Get rid of those pesky text mismatches and spaces

It’s been awhile since I’ve posted but I had to share this info.

When working with SharePoint lists, we need to do our best to standardize data. One instance of this is if you are using an “Email” column as the primary key to match data between two different lists. To ensure that your users are entering the same data we need to add some extra function when submitting this data.

Normally when I am submitting text to a SharePoint list I would enter in something like this in my Patch statement:

Email: EmailColumn.Text

This is fine for the most part but for something like an email column you could potentially end up with entries like, MYEMAIL@EMAIL.COM, MyEmail@Email.Com, etc. As you can see these are all the same email address but PowerApps takes these entries literally so basically these are all different email address. Another issue I’ve encountered is that sometimes users will copy email address from other sources and will unknowingly copy a leading or trailing space. Upon troubleshooting you will not notice this until you dive into the list and actually open the line item itself and highlight the entry. This is an absolute pain in the butt and has caused me more grief than it should.

To prevent any of these scenarios, we need to add on to the original formula. It’s best to tackle one thing at a time just to make sure that portion of the function is working properly. Let’s start with make the entered text all lowercase. It’s actually pretty simple to do this. All you need to do is use the “Lower” function.

Email: Lower(EmailColumn.Text)

More info on Lower can be found by going to the following url:

This will convert any entered text to all lowercase:
MyEmail@Email.Com –>

That’s step one and is a major win if you’ve ever had the pleasure of dealing with this issue. Now that we have the text portion taken care of we need to focus on removing any spaces from the text. To do this we will be taking advantage of the “Trim” function. Simply add this inline after the “Lower” function. Make sure that you are closing off your ().

Email: Lower(Trim(EmailColumn.Text))

More info on Trim can be found by going to the following url:

Make note that if you are using a collection in your app (highly recommended), the initial entry added to the “Email” field will not change until that collection is refreshed.

This issue has caused me more trouble than is needed. If we make it a practice to include additional functionality like this in our apps we can cut down on unnecessary headaches for not just ourselves but also for our customers.

Have a great day and remember to stay Salty!

“Manage Content and Structure” in Office 365

Miss the old style Manage Content and Structure feature? No? Well this post is just not for you. Now if you said yes then you are in luck. It’s still available in Office 365, just not a menu option.

To use the old “Manage Content and Structure”, add this at the end of the site: /_layouts/sitemanager.aspx


Only caveat is that you must be a Site Collection Administrator for this particular site in order to be able to use this control

This really does come in handy if you like being able to use the GUI to move items across the sites.

Stay Salty!

Emailing List Attachments in Office 365

Hello all! It’s been at least two years since I have posted something technical on my Salty Blog, pathetic right?. This how-to in my opinion was too good not to share as I believe that it will help others that are facing/have faced this issue.

The ability to email attachments from a list is one of those pain points that I seem to face all of the time. This documentation will take you through the process of setting up a new Flow that will grab all attachments for a single list item and will then email those attachments back out to the intended target.

Before I begin, let me preface this post stating that I did not come up with this. I found a couple of posts and podcasts but I wanted to compile this working version into one blog post.

I was searching for an answer on this issue late last year and attending one of Laura Roger’s weekly Power Hours and she presented on this. Here is a link to that original broadcast: SharePoint Power Hour: Flow Attachments & Files . If you follow the recording to the end, you will notice that Flow was not behaving properly. Well, I could not get it to work either and after a month of trying different things, I gave up.

A couple of months later I, I received an update from Microsoft’s Blog on Flow which is named Flow of the Week. This particular flow caught my eye: Send multiple attachments on a single email. I couldn’t believe it! This was exactly what the doctor ordered or at least I thought it was. I had setup the Flow as explained in the blog post but when I would run the Flow, I would receive the following message: “No input parameters provided. Please provide required input parameters ‘To’, ‘Subject’ and ‘Body'”

You’ve got to be kidding me!!!!!! Why is this not working for me?!?!?!?! I just want to send an email with the list attachments!!!!! I need this to work!!!!!

Ok, calm down……… After a couple of weeks had passed and after I tried all that I could think of to get around this error, I went back to that Microsoft blog post and noticed a comment by Vytenis Jazbutis. He explains how he was able to get around this with a “fix” for the issue of the final “send email” step. It doesn’t like and doesn’t want to add the full “file content” file from the array as an email attachment. What it wants instead is the .$content property within the file contained in the array.

I have decided to recreate the blog post showing the new way of grabbing the attachments with Vytenis’s fix. Once again, all props goes to Laura, Sunay and Vytenis of this.

With that being said, let’s dive into this and build out this Flow!

  1. Add a new “SharePoint – Create item” trigger and select the correct SharePoint Site and List.
    *** Please ensure that you already have SP List created that allows storing multiple attachments on the items in it.
  2. Add a new “Schedule – Delay” step
    *** I added this additional “Delay Step” because I was getting inconsistent results. Sometimes the trigger would fire too early and would send a blank email without grabbing the attachments. By adding this 30 second delay, it will give Flow the ability to run each step in the process before sending the email. You may not need this in your environment but in my experience even with SharePoint Designer workflows, I have to add these more often than not.
  3. Add a new “SharePoint – Get attachments” step

    *** This step will be grab all of the attachments added to the newly created list item. Use the Site name and List name from the previous step. We want to then pipe the output “ID” from the trigger, to the input ‘ID’ field.
  4. Add a new “Variables – Initialize variable” step
    *** This variable will be used to store all of the attachments in a single array.
  5. Add an “Apply to each” step.
    1. Click inside of the *Select an output box and click the “Body” output from the “Get attachments” section
    2. Click the “Add an action” button and select “SharePoint – Get attachment content”
    3. For the ID field, select the “ID” output from the “When an item is created” trigger section
    4. For the File Identifier field, select the “Id” output from the “Get attachments” section
    5. Click the “Add an action” and select “Variables – Append to array variable”
      1. For the Name field, select “attachmentArray” from the dropdown. (this was created in step 4)
      2. For the Value field, type in the following JSON statement:
        1. {
        2. For “ContentBytes”, click between the : and , and then click on the “Expression” output
        3. Type in the following expression: body(‘Get_attachment_content’).$content and click the ‘OK’ button
          *** “Get_attachment_content” is the name of the step created in 5b. Don’t forget the underscores for spaces.
      3. For “Name”, click between the ” and : and select the “DisplayName” output from the “Get attachments” section
        *** See “Note” below on additional details about the “ContentBytes” parameter
        The completed step should look like the one seen here
  6. Add a new “Office 365 Outlook – Send an email” step
    *** Note: Use whatever mail client that you have setup to run this step.

    1. Fill in all of the required fields (if applicable to your mail client).
      *** I have a list value that I am using to populate my “To” field.
    2. Click the “T” icon next to the Attachments Name field. This switch will change the attachments control from “Detail inputs for array item” to “Input the entire array”
    3. For the Attachments field, select “attachmentArray” from the “Variables” section.

  7. The completed Flow should look like the following:

Save your Flow, then go to your list and create a new list item with attachment(s) to test. Remember to be patient if you put in the delay step. You should receive an email with the attachment(s) that you added to the list item.

This solves a lot of issues that I was having and I hope that it will help you in some way.

Stay Salty!

Partnering with Bible Belt Outdoors

I would like to take this time to thank Brett Hall for inviting me to become a pro staff member for Bible Belt Outdoors. I’m super excited and am looking forward to working with and representing this wonderful organization on the hunt. For now, you can follow us on Facebook @biblebeltoutdoors, Twitter @biblebeltoutdrs, Instagram @biblebeltoutdoors and check us out on the web at Stay tuned for some exiting things that will be coming your way!

Steps for Successful Conversations

Recently, we have been learning how to deal with difficult conversations at work.  At first, I was a bit dismissive about the whole deal but after going though some of the training I realized that I could learn from this experience.

Here are some suggestions, not in any particular order, that I took away from those sessions that may help you when dealing with an uncomfortable conversation or meeting.

Being Prepared
“What is this about?  Why am I here?”
Try to think about what this conversation is about.  If possible, try and identify the mood of the other individual(s) to help better prepare you for what type of encounter this may be.  As hard as it may be, remember to remain positive throughout this process.  If you go into this with anger or negativity, it could make matters worse.  Smile 🙂

Extend an Invitation
“Would you like to sit down and discuss this issue?”
If you sense there may be friction between you and someone else, reach out to them.  Be genuine about the request.  If you feel that you are forced to do this, it’s going to show and will probably not help any situation.

Remain Open
“Yeah right, easier said than done!”
Sometimes, this is a little more difficult for me.  If I feel as if I have been mistreated, I tend to close up towards that person/situation….. Shield’s Up Captain!  This is where a positive approach comes into play.  As hard as it is, sometimes you just have to let your force fields down and listen to what the other person has to say.  There may have been another situation unrelated to your encounter that could have put the other person in a fowl mood and they passed that on to you.  Talk to them and be ready to listen.

Take Responsibility
“Hah, Wasn’t Me!”
Owning up is never easy.  This goes back to childhood for most of us…. “If I could just get away with it, I won’t get in trouble.”  The only issue with that statement is that 9 times out of 10, you are not going to get away with it.  As a professional, I have learned that I have to “Own” my mistakes rather than run from them.  Will there be consequences? Sure, but depending on how you handle the situation determines what the next action(s) will be.  You need to be able to handle both positive and negative feedback.  Use this as an opportunity to grow.

Share your Goal
“By the end of this meeting, I would like to know why this happened”
Use this as an opportunity to determine the purpose of this encounter.  I have spent many hours in meetings for what I thought was a valid reason, only to come out of it with two hours of my life wasted on non-productivity.  Set you a goal for the meeting and then share that.  Try to stay on topic (I know, I know… this is nearly impossible :p).  You should have a predetermined outcome of how you want the encounter to end.  Remember to compromise!

Share your Experience
“I don’t want this to happen to anyone else”
Often, we are faced with similar situations and realize halfway through “Haven’t I been here before?”.  It’s best to take the time and share with others.  For example, you may be faced with an irate user and you were able to diffuse the situation, but this happens more often than not.  Don’t be a punk and let you co-worker walk into this issue without any prior knowledge.  Prepare them… share your experience.

Invite Feedback
“So what you’re saying is….”
Use these opportunities to build upon the situation.  It’s always easier to try and hurry up difficulty situations because quite frankly, you just want this to be over.  This goes be to “Being Open” about the whole ordeal.  Use this time to ask questions.  For example, you could use phrases like “Do you have any suggestions for what I could have said or done differently?”, or “I do not want situations like this to occur in the future.  Could you help me learn from this?”.  Remember, this is just another opportunity for growth and professional development.

Co-create a Solution
“Hey, let’s get together and bang this out!”
There are times when it may be best to work out a process together.  This applies to both projects and/or goals that may have been set for you by your management.  Take the time to sit down and discuss what needs to be accomplished.  Try to come up with a mutual agreement (sometimes hard to do :p) as you work though this.  Remember that others look at problems differently and it’s good to see ideas from a different perspective.

Document the Conversation
“What was that meeting about…. I wish I would have wrote that down!”
Unfortunately, this has happened to me a few times.  With the advancements in smart phones I can at the very least take notes using my phone but using these devices can be frowned on based on perception.  At a previous job I was always told “Perception is Reality”.  This statement is “sort of” true.  I could be taking notes on my phone but the person I’m meeting with might think I’m just playing games or surfing the internet instead of paying attention.  Bring a notepad with you next time and listen to what is going on.  Pay attention to key words and don’t be afraid to ask the person on the other end to repeat what they just said or to slow down for just a bit so that you can finish with your note.  This is VERY important especially if you are working on a new project or your end of year review depends on steps dictated in that meeting.

In closing, I just wanted to state that I am no expert at any of these steps.  I am simply passing along information that I have been presented and my personal advise on how to handle the different situations.


InfoPath – Limit a Repeating Section

I had a requirement in one of my forms to limit the number of repeating sections to be displayed.

I read through some blogs that gave me some ideas on how to increment the row number which was very helpful and got me on the right track. Check them out when you have a moment:

Basically, you will need to auto increment a number field when a new section is added to the form. There is a very simple way to handle this and it only takes one rule and one field.  To do this, follow these steps.

  1. Create a new interger field and add to your repeating group.  For this example, we will name it Count
  2. Right click on Count and click properties, then click the fx button.
  3. Check the box to Edit XPath (advanced) and enter in the following formula: count(../preceding-sibling::*) + 1
  4. Click Verify Formula then click OK
  5. Make sure ‘Refresh value when formula is recalculated’ is checked
  6. Click OK
  7. If you have not added the repeating section to your form, do this now
  8. Preview your form to make sure that everything is working properly
  9. Click on the repeating section and then click ‘Manage Rules’ in the ribbon
  10. Add the following formatting rule
    1. For the Condition:
      1. Field: Count
      2. is greater than or equal to 5
    2. Check ‘Don’t allow users to insert or delete this control’
  11. Preview your form

You should now see that you can only be able to add a total of five repeating sections.  You can change this number to limit what you actually need.

I have included an example template that demonstrates how this works.  Please note that this form was created in InfoPath 2013 and is a browser based form.


Enjoy and Stay Salty!


PowerShell – How to retrieve all deployed solutions

One of the quickest ways to find out information about your installed solutions is to use PowerShell.  To do this, login to one of your WFE’s and open SharePoint Management Shell.  Then, type in the following command: Get-SPSolution | Export-Csv C:\DeployedSolutions.csv.  Open this file on your local machine (or whichever has Excel installed) and dissect as needed.

This will return a fairly good amount of detail regarding your current solutions including but not limited to:

  • Solution Name
  • When/where deployed
  • Version
  • Status


SharePoint – Retrive the internal column name for lists/libraries using PowerShell

I have been using this method for some time now and decided to make a slight change to it.  I have been using the PowerShell method found here to find the internal column names for my lists and libraries.  It works great.  The only problem with this is that I have to modify the script each time I need to change the value of the list or site.  This is usually not a big deal since I generally am only looking at one list.  This was not the case the other day.  I needed to look at many different lists in the same site.  Instead of having to modify the script each time, I added a set of parameters to prompt me at the command line.  The code looks like this:

###### Declare Input Parameters -- Includes Hidden Fields ############
$web = Get-SPWeb $Site;
$list = $web.Lists["$ListName"]

$list.fields | select Title, InternalName, Hidden, Sealed, CanBeDeleted | where {$_.Hidden -eq $false} | sort title | ft -AutoSize
  1. Download Get Column Names Script
  2. Save the script to a directory on your SharePoint server
  3. Open the SharePoint Management Shell for PowerShell
  4. Navigate to the directory where you downloaded the script
    example:  d:\scripts
  5. Run the script: getColumnName.ps1
  6. Enter in the variables
    ***To include hidden fields, change {$_Hidden -eq $false} to {$_Hidden -eq $true}***

Your screen should resemble the following before the command runs


Mike Smith has a lot of great tips on his site.  I suggest that you check it out:

Stay Salty!

InfoPath – Multiple attachments in one web based form

Attachments in InfoPath are great.  The only issue with this, is that you can only attach one file to your form at a time.  In order to get a around this, you will need to add a handy dandy repeating section.  I have also added a count box to show how many attachments have been added to your form.  You also will have the ability to hide all of your attachments.  That’s where the count comes in handy.

I like to use this hide function for my attachments especially when I have a form that goes through an approval process.  I have attached a starter form using these controls.  The ‘attCount’ field has a default value set to count how many controls have been added to your form.  There is one rule set for the repeating section to hide it the ‘hideAttachments’ is set to ‘TRUE’.

I saved the form in a 2007 web based format.  You should be able to open in all versions of InfoPath 2007 – 2013.

Download Multiple Attachments Form

Stay Salty!