Regex to validate email ids in InfoPath

Requirement – InfoPath form’s column should allow multiple valid email ids to be keyed in, separated by a comma.

InfoPath allows validation of an email id by default. It has a pattern to compare to. However, when the need arises to have multiple email ids inserted in a column, how to validate if all are valid email ids and are separated by a comma?

Solution – Write a validation rule for the column. The condition would be

Field: Email

Condition: does not match pattern

Custom pattern:  ([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\s*,\s*([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}))*


Repeating table’s column promotion/concatenation when data is from secondary source

When a repeating table has data from the Main data source, you can concatenate and promote the columns as I have already discussed in my previous blog here.

And I was with the mindset that it would work with secondary data source as well, but that was my misconception.

When a repeating table is bound using a secondary data source, then the formula to concatenate the columns of the table changes.

If we use the same old formula, the output won’t be as expected.

Continue reading

401 Unauthorized error while calling a web service

I have already written about the 401 Unauthorized error earlier here. But I faced something else which I thought I should write to save someone else’s time.

Being the site collection administrator I didn’t expect this error, however when trying to access a web service from my site’s workflow I encountered it. Twice this has happened to me while moving my applications to the production server and I made it a point to write about it.

Background – My application has a Nintex workflow that uses the “Call Web Service” action. This action made a call to the copy.asmx web service. Worked all good until it was in my development and UAT machines. The moment I moved it to the live environment, it started throwing the 401 Unauthorized error. I ensured that the account accessing the web service has full control (also made it site collection administrator), still the error didn’t go.

Continue reading

Extracting Info Path Attachment using Nintex

Of late I had been working with Info Path forms, always using the attachment control to upload files. However, anytime I had to see the attached file or use it to send in an email, I had to open my Info Path form. Obviously not a very great approach as my users didn’t wanted to do this all the times. 

This led me to do a bit of research and here I am able to extract the attachment using a Nintex workflow. Below is the simple sequence of steps to achieve the same. Continue reading

Repeating table’s column promotion/concatenation & extracting individual data

Repeating tables in Info Path is no doubt a wonderful control that gives the users the suppleness to enter information in a table. But when it comes to use the individual rows/columns of this very table in SharePoint, all doubts and fears surface.

Same was with me so I decided to write about it.

Problem statement – How to promote a column of a repeating table and how to extract the individual row of data. Continue reading

Redirection to a page on InfoPath form closure inside an InfoPath Form Web Part

Info Path Form Services is a wonderful component of Microsoft Office that allows the development of simple forms with moderate complexity. The service allows Info Path forms to be hosted in a SharePoint web site and served using a browser-based interface. With only rules and no code (most of the time) and a browser enabled form, the Info Path Form works for machines even though the Info Path client is not installed. In a nutshell, the Info Path form solves much of your problems without writing any code and even without the client – quite useful to me most of the times.

Problem Statement
However, every time I create a rule to close the Info Path form after submit or cancel event, I end up with a message “Form has been closed”. My users were definitely not happy with it. They wanted to be redirected to some page after they close the form, instead of seeing the above blank message and again going to the desired page through navigation. So I thought to find a permanent solution to this and put an end to this problem. Here goes my post explaining the same. Continue reading