Boolean expression as a condition for an InfoPath Form

yea, so I have this crazy requirement…

I have like 30 fields that are required on a form.  We have created a ‘warning section’ that must show a warning to the user stating which required fields are not yet filled in.  On the surface not really that big of a deal, only we cannot add ‘code behind’ on this form.  What to do?  Tap into some mad Rulez Skillz and consult the Interwebs for a crazy @$$ expression…

so I built an awesome expression, tested it and bam, not the result I wanted…I tried grouping expressions and no go…back to the drawing board…

well, I have built this expression seems like a shame to let it sit there and waste away…now what?  During troubleshooting I used the expression to populate a field, so I could see that it was setting true or false…then light bulb!!!  I can set a rule on the section to wait for that field to become true, then hide the section…

That is what my friend Keyur calls ‘Bam!’  So finally, I have a warning section that hides or shows properly based ont eh required fields being filled in…nice…

I forgot to add a the expression, it looks a little bit like this

boolean(../my:field1 != “” and ../my:field2 != “” and ../my:field3 != “” and ../my:field4 != “” and ../my:field5 != “” and ../my:field6 != “” and ../my:field7 != “” and ../my:field8 != “” and ../my:field9 != “” and ../my:field10 != “” and ../my:field11 != “” and ../my:field12 != “” and ../my:field13 != “” and ../my:field14 != “” and ../my:field15 != “” and ../my:field16 != “” and ../my:field17 != “” and ../my:field18 != “” and ../my:field19 != “” and ../my:field20 != “” and ../my:field21 != “” and ../my:field22 != “” and ../my:field23 != “” and ../my:field24 != “” and ../my:field25 != “” and ../my:field26 != “” and ../my:field27 != “” and ../my:field28 != “” and ../my:field29 != “” and ../my:field30 != “” and ../my:field32 != “”)

Posted in Uncategorized | Leave a comment

Some projects are better than others

Some projects are better than others, or are they? Or are they better in some ways and worse in others.
We have a project that started out as A and is turning out to be not B, not C, more like L3.0…as a developer it has been a lesson in patience, as a professional it has been full lessons that build skills and techniques. We have had to build a completely custom UI atop InfoPath forms. Forms that have bloated rules for just about every control. In retrospect we would have built this in .net atop SharePoint. There’s way more, but I am out of time for this. Later!

Posted in Uncategorized | 2 Comments

I want to insert the file properties into a cell for printing. – ExcelBanter

I want to insert the file properties into a cell for printing. – ExcelBanter.

Alright, so we were recently faced with a challenge. Client has a bunch of templates they use locally on desktops that they want to be more efficient with as part of a conceived application and workflow process in SharePoint. Simple enough, right, create content types, add columns, insert Document Properties into the Document Content Types and Bob’s your Uncle. Well, not quite. This client gave us their ‘Templates’ and this included 13 Word Documents and 1 Excel Document.
They had presented this to another consultant as well as their in house IT team. All had come up with relatively the same set of ‘solutions’ to the problem. What’s the problem? you ask…The problem is that you cannot add document properties, natively to Excel Documents in the quick and easy manner that you can, say a Word Document. We discussed the problem, and like so many before came up with the same possible solutions:
1. Create an InfoPath form to collect data and present it to users via PDF Output (ultimately that is where it needs to go)
2. Create a Word Document version of the Excel Workbook and let users interact with that.
3. A Variety of equally non-workable solutions for the client.
You see, they like the functionality of Excel. There are cells that have formulas and they want to be able to be flexible with those formulas, dynamic even. Which is to say some of the content in the excel workbook comes from the list item in sharepoint, but some of it is manipulated on demand by the user…Word, might could do that. Word with an embedded excel workbook object might could do that, but none of them were quite right.
Which is what leads me to the VERY helpful link above. ‘But, Bill, that is for BuiltinDocumentProperties, and SharePoint Server Document Properties are not in that collection.’ That is correct, however ActiveWorkbook also allows for ContentTypeProperties which exposes the full gambit of Server Document Properties. Note in order to use this, however, you must have the document in a Document Library with properties attached.
Now that I have my modified User Function (based on the link, thank you Gord Dibben), I can now place the formula =DocProps(“xxxxxxx”) and reveal the Metadata in the Excel Document correctly.
So now, user fills out InfoPath Form on list item, on submit, workflow creates several Word Documents and 1 Excel Workbook from Content Types, saves them in a Document Library, and populates Metadata on each newly created document and workbook.
This is an issue we have faced before, and like so many others created work arounds for clients, this time, that was not an option, and so we found a solution.

Posted in Southern Engineering | Leave a comment

Getting the Current User Name or ID in SharePoint using SharePoint Designer no code – Josh Gaffeys Blog – Site Home – MSDN Blogs

REMOTE_USER

via Getting the Current User Name or ID in SharePoint using SharePoint Designer no code – Josh Gaffeys Blog – Site Home – MSDN Blogs.

While looking for a resolution to an issue with filtering a SharePoint 2010 List View, I came across this. We have a column that is a multi-line text column that is populated via workflow with the userids of members of a group.
After some consternation trying to resolve using the [Me] or the [Current User] option with a contains, I had just about given up.
resolution though in the form of…open the page in SharePoint Designer and locate the webpart hosting the list. It is a Data View Web Part, go to the Filters section and create a new filter: choose your column, choose contains, choose new parameter. create this new parameter based on Server Variable Logon User.
Bam! mission accomplished…or at least this battle won. I live to fight the next battle

Posted in Uncategorized | 2 Comments

NOT LIKE [1-9]% : LIKE « Query « SQL Server / T-SQL Tutorial

NOT LIKE [1-9]% : LIKE « Query « SQL Server / T-SQL Tutorial.

This is another gem to keep around.

Posted in BI | Leave a comment

Project GeoFlow: A New Dimension in Viewing Geospatial and Temporal Data – Next at Microsoft – Site Home – TechNet Blogs

Project GeoFlow: A New Dimension in Viewing Geospatial and Temporal Data – Next at Microsoft – Site Home – TechNet Blogs.

Yes Please!

Posted in Uncategorized | Leave a comment

This was (a) Good Friday

A couple of weeks have passed, and little progress made, or so it would seem on the surface.  Especially if one’s only view is through this blog.  Truth is, we have been stacked!  Kids are wrapping up 10 days off school today, headed back for the sprint to summer bright and early Tuesday.

We took the opportunity on Friday for an impromptu trip to the City on Good Friday.  We had a great time, saw all sorts of things.  We apparently were not the only ones, as the entire city seemed packed with people.  New Orleans is such a vibrant city.  While walking through the French Quarter we saw lots of different people.  Different Religions, Different Nationalities, Different Orientations, Different Socio-Economic states.  Kate saw lots of pan handlers, beggars, gutter punks and what not.  We spent a fair amount of time Friday night having conversations about what she had seen.  As a parent, it was a trying time.  The Dichotomy of wanting to have this discussion with a growing child wrested with the desire to protect her from the ways of the world.  I can’t say it was painful, but it was difficult.

Erika and I are blessed that we have 2, mature beyond their years, children.  We are also blessed that we have the security of wonderful home to retreat to.  The lesson, beautifully wrapped up at 11:55pm Friday night.  God loves us as humans.  God loves all humans. God’s love is unconditional.  God may not like us, individually or corporately, sometimes.  But God loves us ALWAYS.  Likewise, Erika and I love our children.  Nothing can change that.  Kate and Ian may do or say things that we may not like, but we will always love them.  Further, other people may do or say things we do not like, but we love them as people.  We may not be able to provide help for everyone and God does not expect us to.  That does not mean God will not love us, or that God does not love them.  Sometimes the things we think will help, may in fact hurt other people in the long run.

Kate is a smart girl.  She, like all of us is hurt seeing others in need.  She like all of us wants to help.  Her heart hurts for those who need help.  She is learning that our choices, everyday have consequences.  Sometimes they are positive, sometimes they are negative.  Some choices lead to a healthy life, other choices lead to addiction, homelessness, hunger.  Some choices we have control over, while other choices we have little control over.  The best we can do is make wise choices when we can. When we do not make the wisest choices, we need to recognize it and learn from those poor choices.

Our love for our children is unwavering, it is unconditional.  God’s love for his children is unwavering, it is unconditional.

Posted in Uncategorized | 3 Comments

Are you a SharePoint Developer? GCR wants to talk to you!

We are looking for qualified SharePoint Developers at GCR . Reach out to me if you are or know someone who might be a good match.

Posted in Uncategorized | Leave a comment

Fajita Rub

Fajita Rub

Erika Mixed up a batch of her Fajita Rub a little while ago and the smell has penetrated every nook and cranny in the house. This stuff is intoxicating!
I bet if we ask nicely she will share the recipe.

Image | Posted on by | Leave a comment

Back Tracing Data from SSRS to source Data

Do you ever get questioned regarding the validity of data provided by your SSRS Reports?  I do regularly: ‘This does not look right’, ‘Are you sure that is the right number?’ that kind of thing.  As a rule my answer is I don’t know.  The report simply reflects the data that is in the database, so let’s look at it.

Understanding your finished product is all about understanding how SSRS collects and regurgitates the data in the data source.  SSRS has:

  • Datasources
  • Datasets
  • Parameters
  • Filters
  • Grouping

I am not going to go into all of these, but suffice to say each of these is an opportunity for data to be mangled.  The DataSource is basically the connection to the source table, view or stored procedure, typically in SQL, however it could be any number of other data sources.  As a rule, I use SQL Servers or SharePoint Servers, There can be many DataSources in a single SSRS Report.  The DataSet is just what the name implies.  It provides data to elements in the report.  A Dataset cannot provide data to a parameter or filter that is to be used to filter the very same dataset.  That would cause circular logic and the world would implode, so don’t do it.  There can be many datasets and usually tend to be many on any given report.  Mind you that we can filter in the dataset using a where clause in a query, or we could filter using a filter expression defined on the dataset object.  There are reasons to do one or the other and I am not going to dig into that right now.  Within the report itself we can add objects that allow for grouping, filtering, sorting and whatnot. These include but are not limited to:

  • Charts
  • Tables
  • Gauges
  • Maps

Trust me there’s lots more in there that we can set filter or a grouping and easily change the end product.

As you can see there are lots of ways just within SSRS to manipulate the data output.  Unfortunately, we are not done yet.  The Source of the data can also be manipulated to provide data in whatever manner we are looking for.  If we are connecting to a table, well that’s pretty cut and dry (unless that is simply a manifestation of a view). However if we are connecting to a view or a stored procedure, then all bets are off, because those are capable of providing a manipulated view of any number of tables and other views.

Rule of thumb: document your SSRS to the best of your ability, and get to know your underlying data before you get started.  Finally, be prepared to interrogate your data ad nauseum both for your understanding as well as justification of your end product.

SSRS is not simply an extension of  Microsoft SQL Server, it is a monster all to itself.  If you are not prepared to meet it’s challenges, you will never be able to meet those of the business users it serves.

Posted in Uncategorized | Leave a comment