Welcome to Chadd Talks!

Hello everyone! Welcome to Chadd Talks, where I will be blogging about various SharePoint related topics as well as my love for food. I’m new to the whole blogging thing, so bare with me.

A little bit about myself. I graduated from the University of South Florida in 2013 with a degree in Management Information Systems. From there, I wasn’t really sure where my career would take me. I knew what I liked but not exactly what I wanted. Since I was young, I always had a fascination with solving problems. I have to credit this hobby to my dad since he is an engineer. All of this somehow led me to… SharePoint. I started a home lab while in college and have been working with SharePoint for a little over 3 years… SharePoint has a mind of it’s own and it takes an extreme amount of patience to be able to tackle it. I feel like anyone who has worked with SharePoint knows that it can never fully be tackled. This is what makes it so fun and challenging!

Just to give you an idea of what you will be reading in the blog once I add more content:

  • Nintex Forms and Worfklow solutions that I have created
  • SharePoint fixes and workarounds
  • Food! Random, I know, but I like to mix it up a bit

Thanks for stopping by!

-Chadd

Welcome to Chadd Talks!

Microsoft Flow – InvalidTemplate Error

invalidtemplateerror

While recently working on a Flow for a client, I ran into an error that seemed strange.. InvalidTemplate. Problem was, this error occurred after modifying a different step in the flow. I deleted a step that was no longer needed. Didn’t matter that the step wasn’t related to this one.

To fix this, I tried deleting the step and the connections to onedrive and recreating them… didn’t work.

I had to export the flow into a package and import it as a new flow in order for it to work again. A real pain. FYI to all, any major changes to your flow… make sure you’re saving locally and exporting them.

Microsoft Flow – InvalidTemplate Error

Patch a New PowerApps Form on Submit

Recently I’ve been working with a client on converting some of their Infopath forms into O365/PowerApps. I came into a situation where I needed to build a custom repeating table feature inside of the PowerApp. PowerApps currently does not have any OOTB functionality for this. After a lot longer time than I like to admit, I finally was able to get it working but the last problem I had was applying the collection data from the repeating table into a newly submitted form. I was able to pull data from a previously submitted form and change it but I couldn’t figure out how to apply string data to a form that is new and didn’t have a record in SharePoint yet.

So! Then came along a new property that I’ve yet to learn about but looks like I’ll be using a lot. The property is in relation to the form in your app. The “LastSubmit” property.

I applied this to my form submit button and this is what it ended up looking like…

SubmitForm(FormName);
Patch(
SPListName,
FormName.LastSubmit,
{NameOfFieldInSPList: variableName}
)

Using LastSubmit property allowed PowerApps to retrieve the record that was just submitted. That way I was able to apply a Patch function to it. It worked out great! Now all I need to do is add an If function so the form knows to only use this on a new form submit. If it’s an edit form submit, change FormName.LastSubmit to Gallery.Selected.

Patch a New PowerApps Form on Submit

Smoked Wings on a Weber

SmokedWings

Here is my method.

I use Bad Byron’s Butt rub. and add 1 tbs(roughly maybe 1.5) of baking powder per pound of wings. I coat them very liberally and rub it in good. I then lay them out of a drying rack and put them in my fridge at least overnight (this is mandatory for the baking powder to dry the skin out and actually work. I’ve tried to do it less, like 4 hours and it’s not the same)

I use the Weber Vortex and place it in the center of my Weber. (The vortex is highly recommended, but if you don’t have one just try and set up the biggest indirect heat that you can.) Fill a chimney all the way with charcoal and make sure it super duper hot and all ashed over. Dump hot charcoal directly into the vortex, open vents completely on the grill. Spray outer ring of grill grate with any nonstick oil. Preheat for 15 minutes.

The fire is super hot in the center of the grill and I arrange all the wings around it. I smoke them with 3/4 parts cherry and 1/4 parts hickory. I put the wood on the grate, not the fire, gives it a perfect blue smoke. I position the vent over any section, smoke 10-15 minutes, re-position vent 90 degrees, smoke 10-15 minutes, flip wings, re-position vent 90 degrees, smoke 15-20 minutes. Then they’re done! Only takes 30-45 minutes.

I also make a homemade Chipotle Wing Sauce that everyone loves. It’s my own recipe. But you can of course eat them without sauce or use any BBQ sauce/Wing sauce you want.

  • 1 cup of pepper hot sauce. I use Franks or Texas Pete
  • 1/2 stick of unsalted butter
  • 2 tablespoons of apple cider vinegar
  • 1 1/2 teaspoon of White (distilled) vinegar
  • 1 table spoon of Worcestershire sauce
  • 1 teaspoon of garlic powder
  • 1 teaspoon of Celery Salt
  • 1/2 teaspoon of dried thyme powder
  • Salt and pepper to taste
  • 7oz can of Chipotle adabo (the pureed salsa one) Make sure to run this through a strainer, makes it way smoother and better, but you don’t have to.
Smoked Wings on a Weber

Nintex form validation for a choice field where multiple choices can be made – resulting in a required field

This will make it where if any of the three options are chosen with any other option it will make that field required.

Replace Options with the name control of the field. Use this rule on the field you want to be validated.

Nintex Forms for Office 365

or(contains(Options, ‘Option 1’), or(contains(Options, ‘Option 2’), contains(Options, ‘Option 3’))) && {Self} ==””
Nintex form validation for a choice field where multiple choices can be made – resulting in a required field

Require a user to view an attachment before submitting a Nintex Form

 

This is based off a solution I answered on Nintex’s community site. This is just one way of doing it, I’m sure there are others.

 

  • Make a hidden field and give it a JS variable name of “Read”
  • Create a validation rule that it cannot be empty, if empty “You must read the attachment above before submitting”
  • On the hidden field, add custom CSS to hide it, you can’t set the field visible = no in Field settings, the JS wont work if it’s hidden that way. Must use CSS.
    • To do this, open form settings – custom CSS – add code below. Then on the hidden field, put “nf-hidden” as the CSS class
    • .nf-hidden{        visibility: hidden !important;}
  • Create a JS button hyperlink (or really any will work, depends how you want it to look)
    1. Give it a label of “Must Read this Attachment Before Submitting”
    2. Under advanced section, add the following JS to the Client Click Replace google with the link to your attachment
      NWF$(document).ready(function(){      AttachmentRead();  }); window.open(“https://www.google.com“);

      This will call the custom JS in the form setting and also open a link to your attachment

  • In the custom JS under form settings add this codeNintex Forms for Office 365

    This is the custom function that adds “Read” to the hidden field allowing the form to be submitted after the link opens.

    function AttachmentRead () {
    NWF$(‘#’ + Read).val(“Read”);
    }

     

 

Require a user to view an attachment before submitting a Nintex Form

Link a Nintex Task URL to a SharePoint List

I’ve seen this question asked multiple times on Nintex’s community site. From my experience working with On Prem Nintex, I knew that this could be done… but I was curious if it was possible in o365 Nintex. With the addtion of Task IDs being added from a recent update, it now is! It’s also really easy. Here’s how to do it.

  • In your target list, create a Hyperlink column and name it whatever you’d like.
  • Create an int variable for the Task ID (This is at the bottom of the Assign a Task Action

  • Create a build string action and use the static URL to tasks on the task list.

Change “Workflow%20Tasks” if you’ve renamed it to something else, but that one is default. Set the ID = to the name of the variable above. Add a “,” after and whatever you put next will be the name of the link

  • Use a “Create List Item” Or an “Update List item” action to write the URL (varTaskLink above) to the target list

  • Target list now has URL to task

Link a Nintex Task URL to a SharePoint List

Remove Duplicate and/or Orphaned Workflow Menu Items

This is another one of those posts that I just have to blog about because I feel like I will run into this same issue again sometime. I created a workflow using Nintex Workflow Enterprise. There’s an option in the workflow settings to “Enable workflow to start from the item menu” This is very useful because users can manually run this workflow from the item menu when they want to accomplish something. Examples that I have used this for are:

  • End all workflows and delete current item from the list
  • Archive a document

In the case of the Archive Document workflow that I created, which just moves a document to a separate doc library and deletes the original.When I enabled the option to have the custom workflow action in the menu, it somehow created a duplicate… so I now had two options called “Archive Document” when I only needed one.

How could this happen to me!? Of course it happened to me… Okay, so why did this happen?

Nintex listed two potential possibilities:

  1. Duplicate item: The workflow was imported from another environment/site/list multiple times with the menu item enabled.
  2. Orphaned item: The workflow was deleted without first disabling the menu item in Workflow Settings.

The weird part is that neither one of these actually applied to me. The duplication occurred as soon as I published the workflow for the first time. This was an original workflow on it’s own list with no other workflows present.

Let’s fix this thing!

From the research I’ve gathered over at Nintex it seems that there are two main ways to resolve this.

  1. PowerShell (of course!)
  2. SharePoint Designer (of course!)

I actually had a lot of trouble finding this option in SPD.. mainly because my SPD was opening this list in 2010 as opposed to 2013? Uhhhh… This is a new one (will have to figure this one out later) So let’s use the method our best friend would use.. PowerShell

Here is the code from Nintex

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$($($(New-Object -TypeName Microsoft.SharePoint.SPSite('http://WebURL')).OpenWeb()).lists['ListTitle'].UserCustomActions)

Once you have run the above script, you can target the menu item by its index and delete it by running the below snippet:

$($($(New-Object -TypeName Microsoft.SharePoint.SPSite('http://WebURL')).OpenWeb()).lists['ListTitle'].UserCustomActions[0]).Delete()

I ran into a weird issue with this code. Pulling the custom action wasn’t a problem, it shows the one custom action that I had on this list with a sequence of [0] (and I say one, because I removed one entry from the duplicates by disabling the workflow settings option)

OrphanedItemsPowershell1

The problem came when I tried to the delete it…

OrphanedItemsPowershell2

Null? It’s right there! So since it was the only custom action item showing… I removed the [0] and told it to delete them all (just the one)

OrphanedItemsPowershell

I then reran the original code to see if the custom action would show… nothing showed up! So I checked my list and sure enough it was gone. AHHHHHHHHHHHH Yeah!

 

I hope this helps someone else! Happy Nintexing

Remove Duplicate and/or Orphaned Workflow Menu Items