Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Monday, June 16, 2014

Review: SharePoint 2010 - Check DateTime Field is Blank (solution)

My preference in setting up flags is to use a datetime field. If there is a date, then the flag is set. If it is null, the the flag is not set. My problem is using SharePoint Designer to check if the datetime field is empty.

Solution

After some searching, I found the second solution in Reference-1 to work for me. The solution is to create a text field variable, then set the datetime field to the variable. The text variable will have the options to check if it is null, and will be null if the datetime field is null. For me the important step was making sure that the variable is of a type that triggers the conditional statement to include null checks.

Analysis

For whatever reason, the conditional statement does not include null for datetime fields. My guess is that there is something about checking datetime field as null because I did try the first checked solution in Reference-1 by setting a variable as null then comparing it to my datetime field.

As I write this, I think I may have created the variable as a datetime variable. There is a possibility that this may work if compared to a text variable set to null. I would check if I was not already frustrated with working with SharePoint and if I still had that example. Perhaps, I'll try this at a later time.

There was another alternate solution which I did not get around to doing. It requires another column. .

Reference

1- http://social.msdn.microsoft.com/Forums/en-US/6dc36021-5c7d-4d70-8ead-afa36c45dfd5/how-to-check-for-the-date-is-null-in-sharepoint-designer-condition-?forum=sharepointcustomizationlegacy
2 - http://howardmcd.wordpress.com/2013/05/20/how-to-check-if-a-date-field-is-blank-in-a-sharepoint-designer-workflow/

Buggish: SharePoint 2010 - Unable to filter lookup through Designer

After what I think was an update (see recent problem with SP), I noticed different behavior with the lookup. For some reason, I am not longer able to filter the lookup by creating a calculated field. In the past (I am pretty sure that I tested this), I had created a calculated field which was used for the lookup. When the calculated field was empty, the lookup only had values that I wanted to be shown (by ignoring blanks).

Now that I am trying to implement this into our production site, this option is no longer there. Going back to my test site, this option is also not there either. It has been a couple months since I last touched this so my memory on this is a bit fuzzy. The columns that I thought was referencing the lookup, now only references the main column that the lookup was calculated on. The update should not have done this automatically because the calculated field could have potentially had multiple fields. It may be possible that the admin had subjectively updated the fields appropriately which may be why the site was down for a couple hours.

Overall, this is still all just speculation. I wish there was more update from the SharePoint admin team on what is being done. One would imagine that the SharePoint team would be at least one of the teams that maintains a site with the updates. Also at the end of the day, I can no longer use a lookup on a calculated field. I do not have access to the server, so I cannot use the other options... and still wishing that I could just build an app which I think I could still create faster.

Monday, June 9, 2014

Work Life: SharePoint 2010, Why Do You Hate Me So?! Unable to display this Web Part

I received this error:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

The page always seem to know when I need it most. We use SharePoint to present in our meetings to discuss open items. I get this problem maybe once every month or two. I work on it frequently throughout the day so the frequency is not because that is the only few times I open it.

I think our SharePoint is on a server farm, because we also have a page that displays which SP server we are on. Usually, someone on my team will be on a different server and the page is working fine. We have not figured out what causes this problem nor how to switch to a different server. We think closing and reopening the browser will at least switch us to another server but this usually does not work.

The problem is only on one of our views. The other views appear to be fine, although they are usually empty or have few records (i.e. 1-5). The all views page also works. The list itself comes up without any problems. Usually if I wait a couple hours, the problem will fix itself. It is quite a hassle to get in touch with our SP administrator so I have never contacted them and usually just wait for it to fix itself.

While searching the error on-line, there appears that there could be a couple sources of the problem. At the frequency that we get the problem, my guess is that there was some updates done on the servers. Assuming the rest of the company follows the same as our infrastructure team, we update each server on separate days. There were solutions to actual changes made, but we have not made any changes (at least to our knowledge). Unfortunately, I do not have a solution nor explanation to this problem.

Off topic, I also looked up what the correlation id meant (site provided below). This appears to be an id associated with my session so is not useful to a web search. It is useful for searching the logs for an admin. Unfortunately, I do not have admin rights.


Reference

http://zimmergren.net/technical/sp-2010-find-error-messages-with-a-correlation-id-token-in-sharepoint-2010

Thursday, May 29, 2014

Review: SharePoint 2010 for Dummies by Vanessa L. Williams

I have just started to really sit-down and learn SharePoint Designer for the past week. Prior to this, I have just been an end-user. Unfortunately, a project has been transitioned to me which requires me to configure SharePoint. I have bought the SharePoint 2010 for Dummies by Vanessa L. Williams. So far, the book does a great job in getting me started.

For the purposes of my project, I think there were a lot more advanced 'techniques' that are not covered in the book. Google has been sufficient in those areas. Most of the time, I learn that SharePoint cannot even do whatever I need. There is also a section for forms that require InfoPath which I do not have access to, so I do not have much to comment on that part. I also do not have enterprise, so the last sections are rather useless to me.

Overall, this is a good introduction book. I was able to grasp a lot of the SharePoint terms that made it much easier to search on Google. The way they designed the architecture of SharePoint is not very intuitive for a developer. It may actually be a bit more intuitive for a non-developer, because I spent a lot of time trying to figure how to join lists and figuring the limitations to web-parts.

I should also add that this book is more useful for those who only have access to the Designer. If you are looking for a SharePoint server reference, this is not the book. There is another For Dummies series that cover that, "SharePoint 2010 All-in-One For Dummies". At least this is what appeared to be more server-related when I skimmed through it at Barnes & Nobles. I think it had both coding and admin maintenance, but more on the latter. The all-in-one version does not help at all with the Designer.

Work Life: SharePoint 2010 - Creating Workflow Error

The list of workflow actions on the server references an assembly that does not exist. Some actions will not be available. The assembly strong name is Microsoft.Office.Workflow.Actions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Contact your server administrator for more information.
For me, I had to restart my SharePoint Designer which fixed the problem. My guess is because I opened it yesterday and left it open overnight. My VPN disconnected as usual when my machine goes to sleep-mode.

Here's another site that looked promising, but appears to require access to the server:
http://sharepoint.stackexchange.com/questions/68769/sharepoint-2010-sharepoint-designer-notification-the-list-of-workflow-actions



Friday, April 25, 2014

Coding: Loading SharePoint Objects (C# SharePoint)

This was not the behavior I was expecting, so here is a reminder to myself. When loading objects from SharePoint using the SP Client, I must load the object and still execute query.

            clientContext.Load(object);
            clientContext.ExecuteQuery();

object can be fields, lists, item, etc.

Another unexpected behavior is that dictionary's KeyCollection does not use an indexer, so enumerators have to be used to iterate through the collection.

Tuesday, April 22, 2014

Coding: Where to find where SharePoint Client (SPClient_x86) installed to - Microsoft.SharePoint.Client.dll

Downloaded file from:

For me the files were installed to:
C:\Program Files\Common Files\microsoft shared\SharePoint Client

I am posting this because I could not find where the files were installed to. When looking online, it led to the wrong folder. http://msdn.microsoft.com/en-us/library/office/ee539974(v=office.14).aspx

Tuesday, April 1, 2014

Work Life: Windows Shared Folder

Sometimes you do not have control over how teams manage their files. Here are some of my thoughts when they use Windows folders without source control.

Cons

Version Control

One common occurrence when you have multiple people working on the same files is that someone may override another person's changes. This could occur maliciously or innocently. There is a good chance that if multiple people are working on the same file that they replace the files around the same time. The last person may not have known the file was just updated during the time they were uploading the changes.

Folder Structure

Unless there is an enforcer, everyone has their own breakdown on how data should be broken down or sorted. For example, internal processes could be broken down as Internal > Processes for someone that deals more with internal team vs external teams or Processes > Internal for someone that deals with processes vs templates vs administration.
This process breaks down further when someone is tasked to upload a file to the shared drive without clear knowledge on how all the folders are structured. Thus oftentimes, the person will just create another folder in what they think would be the best bet. A clear indication of this is when you find a lot of folders that have a single file in it.

Duplicate Files

Due to the cons of folder structure, there is also a good chance that users upload the same files in different locations. Although this is also possible in other file sharing solutions, most of the other solutions do have search which help reduce this possibility. Microsoft's search within network folders is less reliable than local files which also is not always reliable.
This makes it difficult for a new user to know which is the official file to use (assuming the person finds both files).

Naming Convention

Due to the above limitations, people have come up with different workarounds. One of the most common ones is to append new, updated, backup (bkp), or a date. After several versions, more files are stored where most will never be used again. By the time that such files may have use, there will be confusion if 'new' is newer than 'new2' or 'new new' or 'newer' or 'newest'.
Sorting is also quite difficult especially if a date is used. Most people like to use the MMDDYY or MMYY or MMYYYY. When the dates spans multiple years, the files no longer sort in chronological order because alphabetically 02.2014 will come before 03.2013, where it should be 03.2013 then 02.2014. Sorting also becomes even more difficult when different delimiters are used: periods, dashes, subscores, spaces.
There is also confusion with MMDD with small values because it is not intuitive whether the file is MMDD or DDMM or MMYY (for example 0102). The problem with MMDDYY is similar in that it can be confused with YYMMDD, for example 010203. The year will eventually need to be appended because theoretically 50% of new files will be created in the second half of the year and 25% in the last quarter. Continuing the same process will likely extend to the following year. Now, the user can either update all the files or they create even more subfolders which is just more overhead or clutter the shared drive.

Best Practices

These are some practices that I like to use.

Dates

I recommend that people use YYYYMMDD if they have to use dates. There are two benefits to this. First, it is clearer that the first part is the year (primarily because the years will never be less than 1200 and months will never be 20+). If for some reason the date is for earlier than the 13th century, use some sort of delimiter. A delimiter could be useful in either case and should be decided by the team. Removing the delimiter is useful in reducing file length which some systems still have issues with. Second, the file system will naturally sort pseudo-chronologically (pseudo because it still sorting alphabetically).

File Backup / Version Control

I recommend that you make a copy of the file you are going to edit then rename the file with the current date (YYYYMMDD). When ready to publish to someone else, copy the file again but rename without the date (assuming you do not want to include the date for aesthetic). This will prevent someone from accidentally click save and override changes by accident. This also prevents file locking issues (use your userid if someone else is modifying the same file). And this is somewhat like version control. If additional backups are needed in the same day, unique identifiers can be added to the end of the file. They should avoid using adjectives, preferably another count for example 20140101.01 or 20140101.01.myid (to identify who owns this iteration). A policy should exist that these exceptions should be deleted at a future date to cleanup and declutter the shared drive.

Folder Structure

There is little that can be done to enforce folder structure especially when managing multiple environments and multiple teams. Ideally, a desired file can only go into one folder or the other, for example internal or external, process flow or templates. This way of thinking would cause increase levels of subfolders which is also undesirable. A user should be able to navigate to their desired files around 3 levels. Any more, the folders have to attempt to be as exclusively mutual as possible.

Friday, March 28, 2014

Buggish: Curly Braces with Confluence v5.1.5 (Jira) and SharePoint

I continue to have issues with the links from SharePoint due to the curly braces. I had hoped the Wiki upgrade would have resolved this which it kind of does.

The editor no longer has odd behaviors when saving and editing the links where the text/link combination kept growing each time the page was edited and saved. But, it does not fix the link issue.

Now, the issue is that the link appears but is not a hyperlink. Also, the curly brace at the end is not made part of the link. This behavior seems to suggest to me that there is a conflict with the editor interpreting part of the link as a macro.

If I removed the curly braces, the link becomes clickable. Thus, I still use the same workaround as before.


Reference
Complaint: Curly Braces with Confluence v3.x (Jira) and SharePoint
Upgraded to Confluence 5.1.5

Thursday, March 20, 2014

Review: SharePoint 2010 - Designer Email Editor, Calculated Column - Left, Substring, Right

Summary

Cannot be done in the Email Editor, but there is a crappy workaround  with Calculated Field.

Backdrop

I did not have a say in the design of our group's SharePoint site. It was not designed using a normal form. I have found my way into the designer to play around with some of the functionality because I need a way to get a substring of a field. The 'developer' working on this does not seem to understand what a substring or text manipulation is. Since I am not familiar with SP, I am playing around to see if I could "point" him the right direction after I figure it out.

Details

There does not appear to be any text manipulation in the email editor. Alternate solution is to create a calculated column. 

I need to provide the last item in a comma delimited field. I found this was impossible if there were more than two items unless there were more parameters to FIND or a FINDLAST function. FIND will return the first comma while I need the position of the last comma. Without a loop, there is no way to navigate to the last comma. 

Fortunately since I am entering the data, I decided to enter the late item at the start of the field. Thus switching to the LEFT function and FIND the first comma. While writing the function code for this, I ran into a few unexpected errors.

The primary problem is that FIND returns an ERROR if a comma is not found. I was expecting a 0 or a -1 or a false. To get around this, I had to use ISNUMBER which then returned either a 0 or a false (documentation says Yes which I seem would be No for false).

At least this does not cause problems if there is an ERROR, the display will just be #ERROR#.

Reference

http://3sharp.com/blog/building-dynamic-strings-in-sharepoint-designer-workflows/
http://msdn.microsoft.com/en-us/library/bb862071(v=office.14).aspx

Friday, November 1, 2013

Complaint: Curly Braces with Confluence v3.x (Jira) and SharePoint

There is an issue with Confluence when using curly braces and URL. This should be easily replicated by typing in any URL with curly braces, like http://test.com/?param={test}. Another example is to copy the URLs in Sharepoint into Confluence.

What happens is that Confluence attempts to convert the curly braces as macros. At the same time, it tries to convert them into clickable links. I was unable to find a way to disable this. I even tried to use the forward slash, '\', to disable to display the curly brace. Since that did not work and I could not disable the conversion, I removed the http portion which helped display the link.

The workaround to fix this problem is to convert the left curly brace with %7B and right curly brace with %7D. For example, http://test.com/?param={test} will become http://test.com/?param=%7Btest%7D. What I do not like about this workaround is having to listen to people complain about having to do an extra step, or even worse not pay attention and not change the braces because not making the change really messes up the page especially if they are embedded in tables.


I apologize that I do not know which version of Confluence is being used. I do not have access and couldn't find it before having to leave work.


Update 1/27/2014 - I have found that the latest this version is 3.x.

Reference

Work Life: Upgraded to Confluence 5.1.5