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

Tuesday, July 2, 2013

CAML Query - SharePoint Action Automate Server

I have been working with a product called BPA(business process automation) Automate Server 9 for about 9 months now and I am finally starting to get comfortable with using the tool proficiently. I am using this tool to improve efficiency and reduce human error in processes that we have not been able to remove the human element from. One very neat use is with SharePoint and moving list items between lists, more specifically lists that are not in the same SharePoint site. With that said, I still have my fair share of mistakes and screw ups because let's face it...I'm human! This leads us to the meat of this post, shall we?

In BPA Automate 9(BPA), we can use CAML queries to help us interact with SharePoint Lists and libraries. I needed a CAML query that would limit the number of records to more accurately filter the data returned by SharePoint to improve the efficiency of my workflow. My goal was to avoid looping through all the list items on a SharePoint library because I only needed a list of the files, not folders.

There are a few things that helped me. The first thing is the following link, http://msdn.microsoft.com/en-us/library/dd582942(v=office.11).aspx. This allowed me to see what I needed in my query, using the Query section. The other thing that helped me is a program called CamlDesigner, which can be downloaded from http://sharepoint.biwug.be/Pages/Downloads.aspx. There is more information on how to use this at this link, http://www.camldesigner.com/?p=596.

There are some syntactical problems with using CAML when you are unfamiliar, as I am. I am posting a CAML query below that shows the format that BPA needs it in. The values in "" can all be change as long as the values are real and match what they are in SharePoint.

<View><Query><Where><Eq><FieldRef Name="FSObjType" /><Value Type="Integer">0</Value></Eq></Where></Query></View>


One of the first things that someone who is familiar with SharePoint and CAML queries will notice is that it is not formatted the way you would expect. It cannot be formatted like a normal markup language. It needs to be tight and without spaces like above. (I know, it doesn't seem to make much sense. I can only think that BPA formats it later so they want it in a nice neat string before they format it.)

Tuesday, November 27, 2012

Filter SharePoint List by Today

I needed to filter a task list in SharePoint 2010 so only tasks that are due in under 45 days will be shown. It turns out the easiest way is to just use [Today]+n. I had my filter set to Commited Date < [Today]+45, with no spaces. This will show all items that have a Commited Date in less than 45 days. It works the same with greater than, greater than or equal to, and less than or equal to as well.

I found my answer at the following link:

http://stackoverflow.com/questions/745059/filtering-sharepoint-lists-on-a-now-or-today 

Wednesday, November 21, 2012

SharePoint RAG Indicator


If you need to create a RAG indicator, or other type of status indicator, it is a fairly simple process.​ I have found a site that walks through both the 2007 and 2010 setups for creating these indicators. It is not an overwhelmingly difficult task but it does require you to use SharePoint Designer, formulas, and a calculated column. Sarah Haase has a very nice blog about SharePoint which answered the question perfectly.

The steps for this are in the following link:
http://sarahlhaase.wordpress.com/2012/06/06/using-calculated-columns-to-add-color-coding-to-your-sharepoint-lists/

Monday, November 12, 2012

Blank Dropdown Selection in SharePoint


​I needed to have a blank line as the first choice in a field's dropdown in a SharePoint field of type Choice. There is not an OOTB option by any means. Many answers to this use code, but the simplest way is to just use the 0129 ascii character. 0129 is just a blank character which will not get wiped by SharePoint.

Wednesday, October 31, 2012

InfoPath Permissions

In InfoPath, I was not able to set permissions for controls. This restricts us from setting certain controls from being hidden or from disabling when a certain user is looking at an InfoPath form. In order to do this I followed the steps at the following link. It is pretty simple with only a few minor changes to the code and a couple of data connections.


Friday, October 26, 2012

SharePoint

SharePoint is the topic du jour. I am using SharePoint to maintain tasks by using two different lists. The first list is a request list which allows other people to requests tasks, in other words time to work issues/enhancements. The second list is the living list which displays all of the tasks I am currently working. In the Request list, requesters are allowed to attach documents to a list item. Now, this is where the issues arises since SharePoint's attachment process is basically a black box, especially to myself. Using a workflow, I want to use the "Create List Item" action and in the attachments field I want to pass the attachment as the value. SharePoint shows the value of the attachment field as a boolean, which obviously doesn't pass the actual file to the new list.

This is an issue that I have no solved yet to be honest. I will continue looking into this issue but the outlook is bleak so far, but I will update if I find a good solution that doesn't involve VB or C#.

Edit:
I have not found a solution for this that does not use custom code to get the attachment.

Monday, September 17, 2012

SharePoint 2010 Jump Links

Today I am working with SharePoint 2010 to create some training documentation that is more accessible and centralized than just Googling for answers. I am working on a page and it was becoming large enough to be unwieldy and thought jump links would be a nice way to navigate pages. Now my original thought was that this would be clear and easy, but no it is not! I found a solution from another blog that works great so I thought I would share it.
http://mccoard.net/ThoughtfulTech/post/2011/05/11/Creating-a-Bookmark-(anchor)-link-in-SharePoint-2010.aspx