Internal SharePoint User Group presentation – Searching In SharePoint

This is a presentation I gave to our internal SharePoint User Group on Friday, September 19th, 2014. It was targeted to take them beyond the typical “type in a couple of words and hope for the best because SharePoint search sucks” approach.

20140920Image01

My SharePointalooza session slides – Tracking Ethical Conflicts in a Sometimes Unethical World

Here are the slides for my presentation for SharePointalooza in Branson Missouri – 2014/09/13.

Image2014091601

What happens when you move from plain text to rich text to enhanced rich text?

I ran into this situation a while back, but I didn’t write down all the details of what happens when, so now it goes out here to my rememory notebook…

So the situation is as follows… I have a number of multi-line text columns that are set at Plain Text. The customer wants to have some formatting applied to them, which is OK (since we’re going from less to more on the formatting issue). But I know there are situations where if you’re going from more to less formatting, you lose some level of detail in the field.

This is a walk-through of what happens as you move the settings up and down…

Creating the column as Plain Text:Image2014091501

Typical text, and how it looks in a view:Image2014091502

Now a change to Rich Text:Image2014091503

The form with the text formatting and a URL:Image2014091504

And how it looks in the view… all formatting shows up:Image2014091505

Now changing it to Enhanced Rich Text:Image2014091506

Added a table, a hyperlink, and a picture:Image2014091507

And again, it all shows up in the view properly:Image2014091508

So far that works like I would expect… now to work back down.

I changed the column from Enhanced Rich Text to Rich Text and got this message:Image2014091509

Looking at the form, I lost my image. I did retain the text in the table, but the table itself is gone. The hyperlink remained:Image2014091510

That basic change also is reflected in what shows in the view:Image2014091511

Finally, I changed the column back to Plain Text and got this message:Image2014091512

Looking at the form, I’ve now lost all the text formatting and the hyperlink. The Bing URL still shows up, but that’s only because the browser is recognizing it and rendering it as a URL. If I put the form in edit mode, it would just be text. Also, the “And A Table” text has gone from being on one line to being on separate lines:Image2014091513

And finally, here’s what it looks like in the view:Image2014091514

Bottom line… you can change a multi-line text column to go to a higher level of function with little issue. But if you start moving down the list, you’ll progressively lose formatting, even though you’ll keep the raw data (except for images and any links to words/images).

 

Have fun AND learn SharePoint stuffs? Join us at SharePointalooza in Branson, MO September 12th and 13!

SharePointalooza is less than two months away! SharePointalooza is a TWO DAY conference offering sessions and technical workshops on all things SharePoint, Office 365, and Yammer.  SharePointalozza takes place at Branson Landing in Branson, Missouri on September 12th and 13th.

Please allow us to take a few minutes to explain to you why you  should consider attending SharePointalooza.

 

PRICE – Most multi day SharePoint conferences cost at least $1000 in registration fees. Our registration starts at just $30. In addition, We worked out special rates with the Hilton Convention Center to offer a discounted rate of $139 per night. Other hotels in the area cost as little as $39.99 per night making SharePointalooza the most economical choice for your training dollars while bringing you the highest quality content.  SharePointalooza is a NOT for profit event and every dollar goes towards giving you a world class experience. However, we understand that money can be an issue, that’s why we are proud to offer FREE registration to those that need it. If you would like free general registration, just enter the code “SPSOZARKS” on the registration page:  http://sharepointalooza.eventbrite.com

 

OUR SPEAKERS – We are truly blessed to be hosting the greatest experts in SharePoint. You will not find a more world class list of speakers anywhere else.  These awesome SharePoint MVP’s and talented speakers from all over the world are coming down to support the community and have a great time.  We cannot stress enough how much we’re truly humbled by their experience and skill. This alone sets SharePointalooza apart.

 

WORKSHOPS– In addition to standard sessions we also offer more in-depth workshops that you will simply not find at other conferences.

 

LOCATION, LOCATION, LOCATION – The event is being held at a great location in Branson at a world class convention center. Directly across the street is Branson Landing which boasts of many shops and restaurants.

 

LIVE MUSIC – We’ve found some amazing bands from Chicago and Nashville and we are bringing them in to play on an awesome outdoor stage at night to give the attendees and speakers a chance to unwind after a day of learning.

 

SUPPORT – By attending SharePointalooza you are supporting efforts to continue to bring high quality technical conferences to the area. Without your attendance and support these events are not possible.

 

Registration is open! Register today at http://sharepointalooza.eventbrite.com and we’ll see you soon!

 

For more information and a list of sessions check our out website at http://www.sharepointalooza.org

Using The Information Management Policy (Specifically The Retention Policy) In SharePoint 2010

The Information Management Policies feature of SharePoint 2010 has some interesting potential in a few ways I hadn’t imagined. I was familiar with setting retention actions to delete, recycle, or move items after a certain time period had passed, but I somehow wasn’t aware that I could also trigger a workflow. I also wasn’t aware of the recurrence option that would repeat the retention action until the next stage was triggered. In other words… would this feature allow me to run nightly/daily/weekly workflows on a list or library option?

20140717Image01

20140717Image02

20140717Image03

To set up a test, I created a custom list with a couple of columns that I could update via a workflow. It contained the title of the list item, a Date Condition column that I would use to trigger the retention policy, and a date the workflow agent was triggered (it would be updated in the workflow):

20140717Image04

The workflow was very basic… Whenever it was triggered, it would update the Agent Triggered Date column with the current date/time, and send out an email to the person who created the item:

20140717Image05

I then created the Information Management Policy for this list item:

20140717Image06

20140717Image07

The trigger for this retention policy would be when the current date was greater than the Date Condition column plus 0 days:

20140717Image08

Side note: It is highly recommended that you associate Information Management Policies with specific content types, not just a generic Item content type. For test purposes, this list only has the one Item content that it’s using, so I didn’t create a different content type for it.

There are two timer jobs that interact with the Information Management Policies. The first one, titled Information Management Policy, is set by default to run weekly on Friday at 11 pm. It goes through libraries that have policies and figures out if the event portion of the policy is a true condition. If so, it will then set the stage for the second timer job to run against the action portion:

20140717Image09

The second timer job is Expiration Policy, and that’s what allows the action portion to run. It’s set by default to run weekly on Saturday at 11 pm:

20140717Image10

The two workflows need to run in that order. If you were to just run the Expiration Policy timer job, nothing would ever trigger because the event wouldn’t be set. If you run just the Information Management Policy timer job, then the action will never run (even though the event was true).

First Test Run

My first test run involved triggering an Information Management Policy that did not use recurrence. I used the Run Now feature of the Information Management Policy timer job to run that, then waited approximately 15 minutes and used Run Now on the Expiration Policy timer job. Within approximately 10 minutes, I received my email, showing that the policy had triggered.

20140717Image11

I then ran the two timer jobs again, wanting to see if this would re-trigger the email. It does not, as without recurrence the Information Management Policy will only be applied to the document once.

Next Experiment – With Recurrence

My next experiment involved adding recurrence to the Information Management Policy. The question to be answered was whether or not the workflow would continue to run every time the Expiration Policy timer job ran.

20140717Image12

20140717Image13

Using the Run Now features of the Information Management Policy and Expiration Policy timer jobs, I ran a series of cycles against four items that I had in my custom list. In all cases, the emails got sent out in each cycle, meaning that once the Information Management Policy is triggered to run against the list item, the recurrence portion of the policy will run every time the Expiration Policy timer job runs. It does not go back and try to determine if the event portion of the Information Management Policy is still true. In fact, you can go into the list item and change column values that would make the event condition *not* true, but the Information Management Policy will still continue to run each night because it was already triggered the first time.

In effect, this means that if you set the two timer jobs to run nightly (separated by a couple of hours), you will basically have the ability to automatically run a workflow against a list item on a daily basis without manual intervention or action on the item (provided the event portion of the Information Management Policy has triggered).

So What If I Don’t Want My Workflow Logic To Run Every Night?

So while it’s cool to have that workflow run every night, what if I don’t want anything to happen most of the time? If that’s the case, you need to write logic to stop the workflow if certain conditions exist.

In the prior example, I was sending out an email and updating a date in the list item. I changed the workflow to also update a new column… Initial Email Sent. If that column is set to Yes (which is the case after the workflow runs the first time), the workflow will immediately stop and no additional processing will occur:

20140717Image14

The workflow will still be triggered each night based on the recurrence logic in the Information Management Policy. The logic of the workflow will dictate exactly what does and does not happen, though.

What About Multi-Stage Retention Policies?

Since we’ve come this far…

I decided to add a second stage to my Information Management Policy to see if and when that would trigger. Here’s the set-up:

20140717Image15

The first stage still runs the email and updates the trigger date. The second stage will run if today is greater than the Condition Date plus one year. The thought was that the first stage would run repeatedly due to recurrence, and then the second stage would trigger if the Condition Date changed.

My test cycles were as follows:

  • I set the Condition Date to two weeks prior (to trigger the policy immediately) and ran the Information Management Policy and Expiration Policy timer jobs via Run Now. I got the email and the Initial Email Sent indicator was set to Yes.
  • I then ran the Expiration Policy timer job again via Run Now to simulate another nightly run. The workflow ran again, and the logic stopped when it checked the Initial Email Sent indicator.
  • For the third and final run, I set the Condition Date to two years prior. I then ran the two timer jobs. Within 30 seconds of the Expiration Policy timer job, the list item had been deleted and moved to the recycle bin. It showed in the Site Collection recycle bin as being deleted by the System Account, not by me as the person who set up the policy or changed the list item.

Gotchas Found In Testing

When I was updating my workflow during testing, I re-published it a couple of times. When I went back into the Information Management Policy, I noticed that the Action portion of the retention policy was still pointing to a previous version of the workflow:

20140717Image16

I had to go back into the policy and update the action to point to the most current version in order to get the most recent version of the workflow to run. This is something you need to remember if you change the workflow being used.

Conclusions

This would work well in a scenario where we have list items that need automated reminders a year or so down the road (instead of having active workflows “waiting” for 365 days to run the next step):

  • The initial event on the Information Management Policy could trigger on Created Date plus 0 days (so it starts running right away).
  • The first stage is set to run a reminder email workflow with recurrence happening every 0 days.
  • The workflow would check to see if the current date is greater than the reminder date and then set an indicator when the email first goes out. Other logic (maybe when the form is updated) would remove that indicator if the reminder date changes.
  • The second stage could trigger on an Archive Date being added, and it could move the item to an archive list or trigger an archive workflow with appropriate logic. It would have no recurrence specified, so the Information Policy would be effectively completed by then.

There may be a number of other ways to accomplish this, but this would give us the ability to have “out of the box” workflows that run on a schedule rather than require manual triggering on each individual item.

When Your List Item Attachments “Disappear” After You Hit Save…

I had an odd situation reported to me a week or so ago, and I finally figured out what was going on.

In this case, we have a list that supports attachments. The customer reported that they added six attachments to the list item (combination of .xlsx, .docx, and .pdf files). All of the files showed up in the attachment list, but once they saved the list item and opened it back up, the .pdf attachment was gone.

Of course, like all good IT issues, I tried the same thing and it kept the .pdf file I tried to attach… 🙂

When I spent some more time looking at her example, it occurred to me that the .pdf file name was rather long… like 131 characters worth. Given that the file name length maximum in SharePoint is 128 characters, that would be a problem.

So apparently what happens is that you can “attach” the file with the name that’s too long to the list item, but when you go to save it, it gets dropped. Unfortunately, you don’t get any indication that it did so… it’s just… gone.

Getting An SPD Approval Workflow To Cancel On Rejection Or Change

Today I was working on an approval workflow for a site I’m building, and I decided to use the SharePoint Designer version of the Approval workflow rather than the out-of-the-box version. Everything went fairly well until I noticed that rejecting an approval task did not cancel the approval workflow.

In the out-of-the-box version, you can set those options here:

20140617Image01

 

Unfortunately, those same options are not exposed as openly in the SPD version. Instead, you have to set the CancelonChange and CancelonRejection workflow variables to Yes before you start the approval cycle:

20140617Image02

 

Once I did that, anyone who rejected an approval task would cause the entire approval workflow process to halt (as I wanted).

Thanks to Slinger’s post for helping me figure this out: http://slingeronline.wordpress.com/2013/02/27/setting-cancel-on-first-rejection-on-an-spd-workflow/

 

 

Displaying A Customized URL In A SharePoint List Form

My SharePoint Buddy called me today and asked if I could look at something she was trying to do. She had a list form (customized with InfoPath) where she wanted to display a clickable URL that was customized based on a field value in the list. Regardless of how we tried to use calculated values and such, we couldn’t get a clickable URL when she opened the form for display. I did a little research and playing around, and I came up with a nice hack (at least I thought so).

So here’s the basic function we were after (ignore everything but the last two fields… I “repurposed” a test list for this). The URL would be clickable, and was customized with the value in the Search Word field:20140521Image01

The first step was to put a Hyperlink column in the list:20140521Image02

I then went into the form design, right-clicked on the Hyperlink control, and made it “Read-Only” (since we only wanted people to use the link, not to edit it):20140521Image03

Off to SharePoint Designer… I set up a workflow that, when triggered, would built the custom URL in a workflow variable, and then put that variable into the Calculated URL field we added to the list:20140521Image04

In the Set Workflow Variable action, I just took the first part of the URL, added the field that had the custom value, and then added the end of the URL (in this case, we were building a URL for a search result page):20140521Image05

Once the workflow was run, the Calculated URL field was added properly, and the customized form would display it as a clickable link. Exactly what we were after.

She then took it one step further… instead of displaying the URL value like I did on my test page, she just created a link on the page called Description, and set the value of that link to be the contents of the Calculated URL field. So now, the form looks clean, the visible clickable link is the same on all the forms, and the underlying URL in the link is the customized value.

I love when these things work. 🙂

 

How To Get Around “The Selected Cells Are Read-Only” When Pasting Into A Datasheet View…

I ran into an issue when trying to paste data into a datasheet view:

20140520Image02

All my columns seemed to be fine, and I know I had pasted items before. So I did a little research, and found it was a problem with multi-line text fields that were set for Enhanced Rich Text:

20140520Image01

If you have a column in the datasheet view that is set to Enhanced Rich Text, you get the read-only error. If I change that to Rich Text (or Plain Text), then I can paste in the new information with no problem.

Recording it here so I’ll remember it later. 🙂

Fixing Print Overflow On InfoPath Forms

I had a help desk case the other day where a customer was reporting a problem when trying to print an InfoPath client application form. She had created a text box field, but if the text overflowed to another page, it would often be truncated.

This sounded vaguely familiar to another problem I ran into some time back, and my SharePoint Buddy had figured out the solution. The Scrolling option on the field had been set to Show Scroll Bar When Necessary. While this works well when the form is displayed on the page, it doesn’t work when the form is printed. It just truncates the text in the box when a page break occurs.

To resolve this, all I needed to do was to set the Scrolling option to be Expand To Show All Text. Once that was done, the print spanned page breaks with no issues.

20140518Image01