SharePoint: Extending the DVWP – Part 23: Creating Title Based on Other Fields with a Workflow

When working with cascading dropdowns and the Relationship lists that accompany them, the important part of the Relationship list is that the site columns we’re relating are set. The Title of the list time doesn’t matter to the cascading process.

However, from a human maintenance standpoint, that Title can make things a whole lot easier. Last time, we automated its creation using jQuery. I know not everyone enjoys jQuery as much as I do. But, I have good news for you…

You can do almost the same thing with a workflow.

Creating a Title Within a Workflow

Of course, you’ll need SharePoint Designer to create the workflow. So, launch that and open your site:

2010-07-23-ExtendingTheDVWPLayoutEnhancement-Part23-01.png
Site opened in SharePoint Designer

  1. Click the arrow next to the new document icon and choose Workflow:

  2. Site opened in SharePoint Designer

    You may see this message:

    �if so, just wait and then you’ll see the Workflow wizard

  3. Give it a name
  4. Choose the list
  5. Uncheck "manual start" and check "on create start"
  6. Click Next
  7. Then click Actions and choose Build Dynamic String
  8. Click on dynamic string
  9. Click Add Lookup
  10. Leave Source as Current Item, and set Field to the first field you want to be part of the Title. In mine, I want Date of Incident:
  11. Click OK
  12. Type a space, a dash, and another space (or whatever naming convention you want):

  13. Click Add Lookup again
  14. This time, choose the second field you want to use (I’ll use Type of Incident):

  15. Click OK twice
  16. Click on Variable: variable 1
  17. Then click on Create a new variable…

  18. Name it
  19. Click Actions and choose Update List Item
  20. Click this list
  21. Click Add and choose Title under Set this field
  22. Click the fx button
  23. Change the Source to Workflow Data and Field to txtTitle

  24. Click OK three times
  25. Click Finish

Now you have a "dynamic" Title.

Caveats

The downsides to using a workflow are irritating, but not necessarily show-stoppers.

  1. The most obvious downside is that the Title is not set immediately. The workflow takes a little time to process. In the meantime, it will be blank and could confuse users, mess up sorting on that field, and generally look less than optimal.
  2. Any field used in the Title must either be required or you must check for it in the workflow and give a default if not found. If you’ve worked with workflows for any time, you’ll know that using conditionals and branching is non-trivial.
  3. If the workflow ends with an error, your Title may never be set.
  4. If the fields used to set the Title change, it’ll be out of sync. To get it back in sync, you’ll have to write a WF that runs on create AND change, but you’ll have to keep track of the fields and check to see IF they changed before changing the Title.
  5. If you’re keeping track of versions, you’ll have a new version every time the Title gets set or reset.
  6. Showstopper: If the creator doesn’t have Edit permissions (e.g. Contribute w/o Edit), this WF will fail because the workflow runs under their ID so Update List Item will be denied access.

Next time: We’ll look at creating list items with SPServices next.

Hitting Your Targets: Influence Analytics 4

Guest Author: Dr. Michael Wu
Lithium Technologies Inc.

This is the last article of the blog miniseries on Influence Analytics. Previous articles in this series are here, and I recommend that you read them if you haven’t already done so.

  1. The 6 Factors of Social Media Influence: Influence Analytics 1
  2. Finding the Influencers: Influence Analytics 2
  3. The Right Content at the Right Time: Influence Analytics 3

If you follow the procedures described in the above articles, you should be able to find the most powerful and relevant influencers. However, finding the influencers will only get you so far, because eventually your target has to make the final decision. This post examines the last two factors that affect a target’s likelihood to be influenced (e.g. where are they located and who do they trust most).

Alignment: Locate Your Targets

Last time, I showed you how to process social graph data so that the subsequent social network analysis can extract the most relevant influencer to your target. This requires that your influencer and target to be on the same social network. However, the target is a very large and heterogeneous group, so that some of your targets may not be on the same social media channels as your influencers. I call this misalignment (following the basic model that I presented in part 1 of this miniseries). Moreover, individual targets often use multiple channels, and their preferred channels may not be totally aligned with your influencers. With the long tail economy of the internet and so many different choices of social channels, it is likely that even though the largest group of targets are aligned with your influencers, the smaller misaligned groups may still sum up to a very substantial amount.

So it is important to know where your targets are. But traditional demographic data of your target audience is insufficient because it does not tell you what channels your targets use. Fortunately, Josh Bernoff and Charlene Li at Forrester Research have created the Social Technographic Profile, which translates your standard demographic data into the social technographic data. Although it does not give you the precise channels where your targets dwell, it tells you how your targets use social technologies.

This is often sufficient, at least as a starting point, to infer where your targets spend most of their time. For example, if most of your targets are spectators, they are probably passive members of a community and the blogosphere. If they are joiners, they are probably on Facebook and Twitter. If your targets are collectors, they probably spend a lot of time on digg and delicious. If they are critics, they probably spend much time on review sites, like Yelp, Trip Advisor, etc. Finally if they are creators, then they are probably active members of a community, the blogosphere, YouTube, Flickr, or other content sharing sites.

If you are a B2B company, don’t worry. Forrester also has a Social Technographic Profiler for tech companies. However, if the social technographic profiles are not sufficient, then you will need to do a little more market research.

Confidence: Find Out Who Your Targets Trust

If we achieved channel alignment and have powerful and relevant influencers, then the last mile of social influence is the targets’ confidence. Confidence is the factor that is ultimately going to tip the balance and convert your target. So the important question is who and what do your targets trust? In terms of social media influence, there are three sources that are worth mentioning.

  1. People Trust Friends: Data from many research labs have shown that by far the most trusted sources of information are friends and peers. Most of these are people who are directly connected to the target on a social graph. This is precisely the reason why marketers are interested in social networks and the social graph data. But in order to leverage these data properly, marketers must process these data in ways that give high temporal relevance and content relevance (see part 3 of this miniseries).
  2. People Trust Known Authority: Next, people also tend to trust authority figures they already know. These are usually reputable individuals in a very niche domain. However, they are usually unknown to outsiders, so they can only be identified through a domain specific social graph. Since the target as a group often consists of very diverse individuals with very different interests, finding authority figures in each and every interest group is not practical. Therefore, even though authority figures are the next most trusted source of information, the market has not figured out how to leverage this fact yet.
  3. People Trust Social Proof: Social proof is actually a combination of two factors.
        (a) Independent sources.
        (b) Many of them.
    People will trust voices of strangers if they are independent third parties, and there are many of them giving a consistent message. Now, don’t be tempted to release any fabricated reviews or stories. First, it will not work. You cannot possibly keep up with the overwhelming voices of the crowd that is out there speaking the truth. Second, people will find out. If you know anything about crowdsourcing, you will know that the crowd is usually very smart and very efficient. Because it only takes one out of possibly millions of user to spot the wolf among the sheep, you can very easily squander all of the good will you have built up. Third, it is not worth it, because the cost of repairing your good will is far greater than the benefit you can reap from the temporary confidence of your target.

The Final Touch Up

Now that we know how to locate the targets and we also know a bit more about whom they trust, how can we leverage this information? Clearly, if you already have a list of influencers and list of targets, you want to match the target with the influencer that has the greatest potential of influence. And these are either people that are close to the target on the friendship social graph or known authority figures for your target. Another simple way to align your influencers with the targets is by promoting your influencers, so they become more visible to your targets across different channels. This will also boost your targets’ confidence by enhancing the effect of social proof. Moreover, if you have enough influencers, the network effect of their influence will amplify and spread.

You can be creative in promoting your influencers, but this must be done with great care. If your target feels that the influencer somehow has a vested interest in promoting a point of view and that he is no longer an independent third party, the influencer’s credibility will be greatly discounted.

A simple way to promote your influencer is to make his credibility (e.g. his reciprocity data or reputation data) visible to your target. You can also help your influencers in a subtle ways that make their content more searchable, and therefore more influential. For example, tagging and labeling their works with SEO terms. Cross post your influencers’ work (with permission of course) and link back to the sources. Tweet and social-bookmark your influencers’ reviews, blogs, videos, etc., and show others how many people have benefitted from them. These simple acts will help search engines direct the targets to your influencers more effectively without turning your customers into shills.

Conclusion

This concludes my miniseries on Influence Analytics. We have come a long way. We started with a simple model of social media influence and outlined six critical factors for the influence process:

  1. Domain credibility
  2. High bandwidth
  3. Content relevance
  4. Timing (temporal) relevance
  5. Channel alignment
  6. Target confidence


Subsequently, I’ve shown you the data and analysis that must be done in order to cover these six factors. I must emphasize that each factor is a necessary condition for influence, but none of them are sufficient! Therefore all six factors must be met to achieve true influence. Any missing factor is like a missing link that breaks the whole chain, and it will prevent the influencer from ever reaching your target.

Finally, you are now ready to embark on the journey of social media marketing. Next time I will show you how we have applied this knowledge in the community setting.

This article was originally posted on the Lithosphere.

Guest Author: Dr. Michael Wu
Lithium Technologies Inc.

Michael Wu is the Principal Scientist of Analytics at Lithium Technologies Inc. Michael received his Ph.D. from UC Berkeley’s Biophysics graduate program. He is applying similar data-driven methodologies to investigate and understand the complex dynamics within online communities as well as the greater social web. You can follow Michael on Twitter at @Mich8elWu or on LinkedIn at Michael Wu PhD.

[tweet]

Experts Conference in Dusseldorf: Hope to See You There

Mark Miller -- Experts Conference, DusseldorfI’ve been invited to present a couple sessions as the Experts Conference, Dusseldorf in October. I’m very excited after not being able to participate in Steve Smith’s Evolutions Conference in London because of the ash cloud. Looking forward to seeing all the people who follow EndUserSharePoint.com in the EMEA countries.

There’s a video embedded below with testimonials from the Experts Conference in LA in which I participated in April.

To get the ball rolling for Dusseldorf in October, how about a �500 discount on a full ticket? I thought you’d say that. Read on and then send your request to Michelle to get the discount code. Normal price is �1350. Mention my name and get a full pass for �850.

October 4-6, 2010, TEC 2010 Europe will take place in D�sseldorf; a city known primarily for style, fashion and where the old meets the new. Perfectly appropriate for SharePoint�s debut in a conference that is close to 10 years strong.

Conference Facilitator and well known SharePoint expert Joel Oleson has lined up a first class cast of global SharePoint speakers for the event. You can find out more about TEC by visiting www.tec2010.com or contacting michelle.gamlin@quest.com.

To receive a �500 discounted off the normal registration of �1350, email Michelle Gamlin and tell her Mark sent you. Can’t do much better than that!




I am about to have SharePoint 2010 hosted outside my domain (we do not have it installed yet).  The provider will handle the backups at their site.  I have a concern over deleted items.  I understand the two recycle bin concept that has been around since 2007.  I am looking for a way to read and "copy" the deleted items to a file system share at my local domain site.  The reason is that the provider is only doing 7 days of backups.  They are not in the business of babysitting our data.  But if I can save deleted items each day (low bandwidth) at my site, I will have a 7  year archive of all content (minus site deletions, of course).  I have seen an example on deleting all items, but not reading a list of them.  I am very familiar with VBScript but am not so strong on Powershell.  Can anyone point me in a good direction to accomplish this?

SharePoint: Extending the DVWP – Part 22: Creating Title Based on Other Fields with jQuery

When we were loading data into our relationship lists, we set the site columns to not required so that we could load one column at a time in the datasheet view. We talked about the fact that it would be a major headache to try to automate filling the Title field with a workflow at that time. And, we couldn’t even use a Calculated column because Lookup columns aren’t visible to a Calculate column.

But what about ongoing maintenance of these lists?

If your environment is such that an update will require loading a completely new list to one of the drop-downs, you will need to do the same thing we did before. But, if you (or an administrator) will be adding one record at a time, it would be nice if the Title was auto-filled.

PreSaveAction() to the Rescue

And jQuery, of course:

Given the following NewForm.aspx for adding a new relationship:


New Item form with required site columns and non-required Title

We want to do two things with jQuery, so we don’t have to un-ghost the page:

  1. Hide the Title row – We’ll do this with jQuery instead of in the List settings, since we don’t want it to always be hidden; just here. Because we’re going to…
  2. Concatenate the choices in the site columns (Location/Department and Group) and save that string as the Title when the user clicks OK

Here’s a sneak peak at the jQuery, then I’ll explain it:

Hiding the Title Row

The block inside $(document).ready(function() {}) runs as soon as the page is loaded ("ready"). Here’s the HTML from the ‘view source’ of the page to show what the page looks like when it’s loaded:

This is the entire row that we want to hide. The easiest way to find it is to look for the form field (or textbox) that is used to enter data. That’s the part in line 463: the <input � title="Title" /> tag. Notice the title attribute is set to the same thing as the H3 label in the left TD cell.

So, in jQuery, we say "find" like this: $("search criteria"). $("input[title=Title]"), then, means: "find the input tag that has a title attribute set to "Title" which is exactly what we’re looking for.

Now we traverse "up" or "out" of the nested HTML:

  1. We found the input tag, which is inside a span tag, so…
  2. .parent() is the span tag, which is inside a TD tag, so…
  3. .parent() is the TD tag, which is inside a TR tag, so…
  4. .parent() is the TR tag that we want to hide, so…
  5. .hide() hides it.


Title row is now hidden; we’ll set it programmatically before the save completes

Concatenating Fields for the Title

A few articles ago, we talked about the PreSaveAction() for use with the DVWP. In that case, we have to explicitly call it before a form action link is fired.

For a default (List Form Webpart) ghosted page, PreSaveAction() is called automatically when the OK button is clicked. That means, we just need to put code inside that function and SharePoint will process that before it submits the change to the database.

Just like with the Title control, we can find each of the other two boxes by searching for the input tag that has the appropriate title attribute set to the display name of the column.

So, for the first lookup control:

  1. $("input[title=Location/Department]") finds the control, and…
  2. .val() gives us the contents of the value attribute, which we…
  3. Store in the var we’re creating: txtDept

Repeat for the other control, storing the value in txtGroup

Now, we’ll find the Title control again:

  1. $("input[title=Title]"), but
  2. instead of getting its value, .val() sets the value attribute to
  3. txtDept + ‘ – ‘ + txtGroup

Since those two columns are required, both of them will have data or the page won’t save. But it won’t save until we set the Title.

2010-07-22-ExtendingTheDVWPLayoutEnhancement-Part22-03.png
Location/Department is set to Couriers, Group is set to Authorization Team. jQuery will concatenate these for the Title (hidden) before saving

2010-07-22-ExtendingTheDVWPLayoutEnhancement-Part22-04.png
The Title was set by jQuery

You could do something similar with the EditForm.aspx if you wanted, but it might be overkill, depending on how often changes will be made and how important it is that the Title always be exactly perfect.

Next time: We could have done this with a workflow, which we’ll do next time.

SharePoint: It�s not just a destination, it�s a journey

Guest Author: Deb Miller
Global 360 Inc.

I�ve been sharing examples in this series about the possibilities of process-enabling SharePoint to drive business improvement in different vertical industries. This example is a personal confession.

 I recently participated in the Microsoft 2010 DC Launch event � actually held in Arlington, Virginia � and really enjoyed meeting some great SharePoint enthusiasts there.  If you were at DC or one of the other launch events I�d be interested in hearing your experiences.  This story is not about the event itself though; it�s about what happened afterwards.  Yes, after� when I got hopelessly helplessly lost on my way home to Maryland.  This story is about my journey and what I learned about SharePoint and business process management along the way.

What happened?  Despite living in the DC area for many years, I had never before visited the actual site for the launch event.   I had printed out the maps and directions both ways ahead of time so I was all set.  That�s right, I didn�t (yet) have a GPS in my car so was still going the paper route. That worked just great getting there, and was going well on the return trip until I missed a critical exit turn � or said another way, �an exception occurred.�   Once that happened I was lost and with every subsequent turn I made it just got worse. 

What did I do?  I refused to admit defeat of course and kept driving until I couldn�t even figure out how to get back to the launch event.  At that point, I actually started thinking about the business analogy for what was happening to me.  Yes, I really did; I am after all an admitted BPM-aholic.  It occurred to me that if we keep our important data in SharePoint � our destination for doing business � how can we help people to use it better to accomplish their work?  If you just use workflow to guide the work path – like my directions guided me � what happens when an exception occurs?  And, how can we help people to gain visibility into their work and have a real time view of status?  This is exactly where business process management (BPM) can be applied.   

What do I mean?  For those of us involved with supply chain, this equates to BPM solutions that process enable our data to achieve the nirvana KPI of the �perfect order� � orders delivered on time, in full , damage free and with the correct invoice documents.   BPM can handle logistics and invoice exceptions when an order fails to follow �the happy path� and help us to get orders back on track quickly.  For Banking and Insurance it might mean better handling of NIGO (not in good order) situations for new policies or loans so that underwriters can be more efficient.  And for the government it can mean securely and easily electronically rerouting selected court orders for review and audit in time for the coming docket trial, or guiding law enforcement in the legal and proper situations to take DNA samples when an unanticipated �event� occurs.

So where did my personal journey take me?  Well, I finally found my way home about 90 minutes late with an almost empty tank of gas.  I was definitely embarrassed about getting lost and thankful to the good Samaritans who gave me directions along the way.  Good news is I�ve since implemented my BPM solution. I now have a Garmin 1490T in my car that organizes and safeguards my data, guides me on my way, knows when I�m lost – sometimes before I do – and helps get me back on track fast! 

Guest Author: Deb Miller
Global 360 Inc.

Deb Miller is Director of Market Development for Global 360. Her work focuses on industry strategies for business process improvement. You can read more of Deb�s writings at http://DebsG360.wordpress.com/ and at @DebsG360 on Twitter.

[tweet]

SharePoint: Find out About Site Users within Microsoft Access (Screencast)

Author: Laura Rogers, Birmingham, AL
SharePoint 911

In her previous screencast, Set up SharePoint List to Auto-Populate User Information, Laura Rogers demonstrated how to create a custom form in order to automatically put pertinent information about the logged in user into a form as they are filling it out.  In a lot of organizations, though, customizing list and library forms in SharePoint Designer is not allowed or is not feasible.  There is a way to pull SharePoint data into Microsoft Access in order to not only view the data in lists and libraries, but view detailed information about who has created or modified the items.  This is done by creating an Access query. 

In this screencast, Laura Rogers demonstrates a way to open a SharePoint list in Access, along with the UserInfo table from the site.   In the organization, this task of using an Access query to obtain user information is usually done by one or two people who are managing the list.   This can be done with any version of Office or SharePoint (2003 and on).

Speaking of joined tables, if you’re looking to create a join between two different SharePoint lists, here’s Laura’s screencast on Join View of SharePoint Lists

Here is some reference information from Microsoft.  There are several different integration points between Office and Access, and a few different ways to connect the SharePoint data to Access.

Import from or link to a SharePoint list

How to Link SharePoint Server 2007 Lists with Microsoft Access 2007

For Admins: If you’re wondering where the list of user fields (properties) comes from, this is something that the SharePoint administrator can set up.  In 2007, it was in the SSP “User Profiles and Properties”, and in 2010 it’s called the User Profile Service Application.  Read Professional SharePoint 2010 Administration for in-depth information on both Office integration and social computing (which includes the user profiles and properties).

For Developers: Tobias Zimmergren has written a good post about this user information list, and a developer’s perspective on it.

SharePoint’s hidden user-list – User Information List

Catch Mark and Laura at SPTechCon, at their half-day workshop on Office integration, with more on what can be done with Access and SharePoint.

Author: Laura Rogers, Birmingham, AL
SharePoint 911

[tweet]

Interview: How to Build a Social Community in SharePoint

Jeremy Epstein"We need to get out of the mind-set that community all happens in one place. — Jeremy Epstein

I spent a half hour with Jeremy Epstein today, talking about building and cultivating an online community. Jeremy and I met last week at WPC and hit it off right away. We turned on the recorder so you can hear the give-and-take between us as we discuss community development.

There’s a little glitch in the audio, with an echo whenever I talk. We were testing out a new recording platform, so I hope this 15 minute discussion keeps your interest while ignoring the glitches and you find something of value.

"Find a technology that fits your vision, don’t make your vision fit the technology". — Mark Miller

SharePoint: Extending the DVWP – Part 21: Cascading Dropdowns – Three-tier Cascade

Last time, we followed steps to make dropdowns cascade-that is, one dropdown filters what is valid in the second.

But, what if you have three dropdowns that need to cascade? For example, Country-State-City. Or Work location-Group-Position.

It’s going to be a bit of a repeat of previous steps:

  1. Create a Lookup list and load it with data
  2. Create a site column that is a Lookup into that list
  3. Create a relationship list that correlates your new third-level list with the second-level
  4. Load the relationship list with data
  5. Add the new site column to your working list
  6. Add the jQuery to cascade those two, as well

Showcase – Employee Work Data

Here’s an example of a DVWP that has a three-tier cascade:

2010-07-16-ExtendingTheDVWPLayoutEnhancement-Part21-01.png2010-07-16-ExtendingTheDVWPLayoutEnhancement-Part21-02.png

The jQuery for the third tier looks very similar to the script that links the first and second tiers:

Works like a charm!

Plus, if the Location changes, but the previous Group is valid for that location as well, it will still be selected; same for the Position.

Next time: Now that we’ve loaded our initial data in the lookup and relationship lists, it would be nice if the relationship lists would "name themselves." We’ll add a little jQuery to make that happen.