Alec Pojidaev's InfoPath Blog
Stuff published for no reason (cool codeless infopath solutions mostly)

Posts Tagged ‘formulas

How to promote InfoPath field to the SharePoint link type field

February 5, 2010

Special thanks: Karl D. Swartzendruber: cruelest boss of all From time to time I’m getting into situations where InfoPath and/or SharePoint limitations don’t allow me to implement what I’ve been tasked to do. Like in that case when my cruel bosses were mercilessly cracking whip on me disregarding my whining about damn limitations preventing me […]

Accessing rows in repeating group for browser enabled forms

January 7, 2010

There are not so many differences in versions of XPath between regular forms and web enabled ones. But inability to reference rows in web enabled forms by the index is one of the most annoying. Here are several XPath formulas useful when interacting with repeating tables: 1. The current row index expression: count(preceding-sibling::*[local-name() = “MyRepeatingGroup”]) […]

How to remove initial row in repeating tables (or delete all rows) with rules only

September 10, 2009

Bookmark that post Special thanks: Karl D. Swartzendruber First of all you have to place your repeating group into the non repeating one. So your field structure should be looking like that: Then as you can see the simple rule f=cleaningGroup will delete all rows. Now we are getting to the point why it never […]

A mutually exclusive check box (radio button) in a repeating table/section

August 26, 2009

Bookmark that post Clean XPath only solution. Browser forms OK. The FORM to try. Create following field/group structure: Assign 0 as initial value to rStarter field. Assign following XPath expression as inital value to the ChBx field: (xdMath:Max(../../my:CheckG/my:rStarter) = ../my:rStarter) and (../my:rStarter != 0) Create rule at ChBx field. This rule has 2 actions: Assign […]

How to check if your InfoPath form is “dirty”? (Tracking changes)

July 6, 2009

Bookmark that post 1) Create field called InitialState 2) At open event assign InitialState field to the following Xpath expression: .. Yes, it’s two dots :) 3) At the submit rule compare InitialState field with the following expression assuming it’s a rule condition at a button: starts-with(., my:InitialState) Make sure the InitialState field is a […]

Infopath codeless programming (walkthrough) 3

June 18, 2009

Other parts: 1, 2. Bookmark that post I hope this will be the last publication about codeless programming in InfoPath. In the first two parts I demonstrated few examples where we can see implementations of ‘while’ and ‘if’ like operators. The only area remained uncovered is block of code reusable by multiple controls (analog of […]

Infopath codeless programming (walkthrough) 2

December 30, 2008

Other parts: 1, 3. Bookmark that post Tested for SP2007 web forms, SP2010 list and library forms (note: the form has to be redesigned significiantly for list form because of different data fields structure). Updated: 5 more forms added at the bottom: “work days calculation (excluding weekends and holidays)”, “work days calculation in the list […]

Infopath codeless programming (walkthrough) 1

December 16, 2008

Posted under tags: Contact Selector Control Infopath Sharepoint