Friday, June 29, 2012

SharePoint List Filter Logic

When setting up a list view using a filter, I could not figure out the logic between ANDs and ORs.  Finally found this great forum post that explains it very well.

Here is a short excerpt:

Because the boolean operators AND and OR have the same level of precedence, in order to achieve what you want you need to be able to group the expressions like so:

(Lead Writer = [Me] OR Created By = [Me]) AND (Status = Not Started OR Status = In progress)

However, when setting the filters using the UI, SharePoint adds the filters sequentially, so it will interpret this as something like

(((Lead Writer = [Me] OR Created By = [Me]) AND Status = Not Started) OR Status = In progress)

Thanks to Paul Lucas

Thursday, June 28, 2012

Text Box Double Click Issue

Environment
  • SharePoint 2010
  • InfoPath 2010
  • Web Form
Requirements
  • Form had several text boxes
  • Client wanted OneNote type saving, where every time they change a text box, it saves the form
  • I wanted a no-code solution, so it needed to be done using rules
  • Idea was to add a submit rule to each text box
Issue
  • Everytime they would type in a text box, it would take two clicks to get to the next text box
  • They type into a text box, then click on the next text box, the form would post back and focus would not return to the text box on which they clicked, causing them to have to click again
Resolution
  • Turn off Post Back on the text box
  • Edit the properties on the text box
  • Click on the Browser Forms tab
  • Select Never
  • My initial thought is to use this sparingly.

Thanks to this blogpost for the idea