Don’t judge him…

   

 

Advertisements

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 != “”)

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!

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