If you need to have more than one workflow for a particular list/library, DO NOT copy a SPD workflow and paste back into the same library.
What happens is that even if you change all of the properties of the files (names, etc.), there is still a hidden property that SharePoint likes to hold on to and uses to identify the workflow. Think of it as an ID.
Basically, you will have two different workflows with the same ID. When you publish one of these to a list/library, everything works fine. When you go to publish the second one, everything seems fine but after close evaluation, you will notice that the first workflow that you published is no longer attached to the list/library.
Moral of the story, don’t be lazy. Create a new workflow even if all of the information is the same.
I was faced with this task recently. Let me paint the picture for you.
I have a document library with over 1,000 items in it. I added a new column (Named) that needs to have the same information as an existing column (Name). For whatever reason, the web part I am using for my list search does not recognize the existing column. I created a SP Designer workflow to copy the contents from the ‘Name’ to the ‘Named’ on creation or edit.
To do this, there are a couple of options.
The long drawn out option – Edit each file individually
The best option for me – Content and Structure
Power option – SharePoint Designer
I went with option 2 because I did not want to lag the server with a whole lot of who ha. Here are the steps I followed to make this happen.
Go to the site, Site Settings, Content and Structure
Expand the library to perform this action
Place a check into the ‘Select All’ check box
Click on the ‘Actions’ drop down and select ‘Check Out’
Once checked out (you may have to do this twice), click the ‘Actions’ drop down and select ‘Check In’
Make sure to check that you have performed this action for all items in your view. Mine were in groups of 100, which is generally the standard view. The fasted option for me would have been the SharePoint Designer route but I did not want to take a chance of checking out over 1,000 items at once and then check them back in. We already have enough load on the servers from all of the other users accessing SharePoint.
We had an issue come up about security with InfoPath forms. One of the major issues was that we could restrict items in the view, but if you used explorer view, all of the security would be bypassed. To counter this, we use a CEWP and the following jQuery script: HideViewsScript
Please note, you will need to change the first line in the script to reference your jQuery file:
Years ago, I setup an InfoPath form for an approval process. There are around 7 status changes during the duration of this form. We wanted to be able to see how long a request would take from creation to approval. This was actually pretty simple. All that you need is a calculated column. Follow these steps and you will be able to time an event/process.
Create Calculated Column (Form Duration)
Enter this for the formula: =TEXT(Modified-Created,”h:mm”)
That’s it! The calculation will look at the fields provided in the formula. The time will then calculate based on how long it took from creation to when it was last modified. If you have a form that hides a submit button based on a status, you will then be able to lock down the time calculation.
There may come a time when you will need to move data from one source to another. You could always use Windows Explorer to do this, but you will not be able to retain any metadata in your library.
Recently, I needed to move around 1,200 files (680 MB) from a folder into a new document library. I tried using Windows Explorer but as I stated earlier, it would not copy over the metadata. Then, I tried using Content and Structure. This has worked for me in the past and it will preserve your metadata. However, this time around, I was unable to copy the files. Not sure why, could have been file size or just the environment.
After all of this, I ended up opening my site inside of SharePoint Designer. Within 2 minutes, I copied all of the files and preserved all of the metadata associated with the files.
To quote an old southern saying, there is always more that one way to skin a cat. Just got to find the right one.
Go to the list or library that you want to resize and add a Content Editor Web Part.
From the script below, I am referencing jQuery from my internal site.
There may come a time when you may need to export your user list to excel. It’s not that difficult.
Copy the following path into notepad/word pad: http://yoursite.com/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[LISTID]&View=[VIEWID]&CacheControl
Minimize the text editor and navigate to Site Actions à Site Setting à People and Groups à All People.
Click Settings on the option bar and click List Settings
Click on “List View” under views. This will take you to the “Edit View” screen
Copy the url of the list view. It will look similar to the following:http://yoursite.com/_layouts/ViewEdit.aspx?List=%7B02ACF6F6%2D8343%2D4244%2D81B8%2D68BF95F9C6D0%7D&View=%7B56BB9BDD%2DABB0%2D4CB6%2DA946%2D59A85A8EC2F9%7D&Source=%252F%255Flayouts%252Flistedit%252Easpx%253FList%253D02acf6f6%252D8343%2
Copy the “List” and “View” IDs for the url that was created in step 5. You list id will follow “List=”. The same applies for the view id. Here is the example from above: List=%7B02ACF6F6%2D8343%2D4244%2D81B8%2D68BF95F9C6D0%7D&View=%7B56BB9BDD%2DABB0%2D4CB6%2DA946%2D59A85A8EC2F9%7D
From this example, copy %7B02ACF6F6%2D8343%2D4244%2D81B8%2D68BF95F9C6D0%7D and replace [LISTID] from step one. This includes replacing the LISTID and the brackets. Also, do not include the & symbol. Follow the same steps for the “View”.
Once you have finished, your completed url should look like this:http://yoursite.com/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=%7B02ACF6F6%2D8343%2D4244%2D81B8%2D68BF95F9C6D0%7D&View=%7B56BB9BDD%2DABB0%2D4CB6%2DA946%2D59A85A8EC2F9%7D&CacheControl
Open a browser, and copy and paste the completed url that you completed in step 8.
A window will pop up asking you to open or save the file. Click open and the file will open in excel.
A security warning will also pop up. Click enable.
12. After you are finished making your changes, you can save this like any other Excel file.
When a user that is restricted from a specific list visits the site; the view of that list displays an access denied message rather than hiding the Web Part from the user. It appears that the security for the list is evaluated prior to the Web Part evaluating the targeted audiences. Since the user does not have access to the list, the access denied message is shown as a result.
We can remedy this issue by granting the lowest privilege on the list for the user. As a requirement, the user must not be able to view any list items, so we will give the user the ability to see the list, but not the ability to see any items in the list. This is accomplished by creating a custom permission level that will contain ONLY the Open permission from the Site permissions group. This will allow users possesing this permission to open the list, but will not grant them the permission to open any items in the list. Grant the newly created permission level to the restricted users on the list and the audience targeting on the list views will now function as intended.
I wanted to be able to show all of the employees birthday’s for the current day. Turns out, this was not a very hard task to accomplish. I have a field in one of my lists’ that contains a birth date field. All of the months and days are accurate, but the years are all set to 1996 for security reasons. In order to show upcoming birthdays, I needed to change a few things.
Here’s the deal with that. The “Birthdate” field holds the actual birthday of the user. In my case, 24-Jul-96. However, I want to see it as July 24 2010.
Well, since the [Today] field in calculated column will not work (all tricks will not work – the field won’t update!), here is a solution that only asks for a yearly update to the column.
First, I created a calculated column that results in the current year “Birthdate”. This changed the view of the date from 24-Jul-96 to July 24 2010. Note: “Birthdate” is the name of the column in my list that contains the actual birthday. Yours may vary.
Create a calculated column to hold this year’s birth date named “Birthday”.
Set the output type of the calculated value to “Date and Time”.
Set the date and time format to “Date Only”.
Use this formula to generate its value.
5. Create a new view of the list named “Birthday” and click on the plus to expand “Filter”.
6. Next, enter in the following. Once you click Ok, you will see all birthdays for the upcoming week.
7. If you only want to see the birthdays for the current day only, simply change the filter to the following.
Just remember – next year you will have to update the formula of the calculated column from 2010 to 2011.