Haaron Gonzalez – Blog in English Rotating Header Image

Forms Management

Unsupported expression in good old InfoPath

Even though Is been announced that InfoPath is deprecated, but supported until April 2023 you can read more here  the reality is that there is a significant amount of customers that still rely on the InfoPath form based solutions for dealing with data entry challenges in the organization on a daily basis. As a consultant, I currently support multiple clients on InfoPath Form related issues.

Today I want to talk about a recent discovery and of course share the solution.

This is a custom list with an InfoPath list form used for storing OA’s (Operational Activities) assignment information, of course, this list has a bunch of fields for specifying the type, who is assigned to, location and most importantly how many hours per week (52 weeks) during the year each OA will take.

Operational Activities InfoPath based Form

Notice the Duration in Hours field, basically this field is automatically calculated based on the number of hours specified on each week. How many weeks do we have during a year? 52 weeks. So, you can guess that the formula to calculate the duration field will be something like this:

Formula for counting the hours on all the week’s during the year

 

 

 

But as soon you want to publish the Design Checker throws an error stating an Unsupported expression error.

Unsupported Expression Issue in InfoPath

After some research found out that the problem was more related to the size of the expression. So, be careful of creating huge long calculation expressions. What I did was to create 4 fields that represent each Quarter and add the formula to calculate the weeks for Q1, Q2, Q3 and Q4. Then I modified the formula in the Duration field to use the 4 quarter fields, something like: Q1+Q2+Q3+Q4.

Bottom line, you never stop learning a technology, even though is a deprecated one.

Microsoft Forms, want to give it a try?  Here is a basic demo

Want to give a try to Microsoft Forms? Yesterday I created a Customer Satisfaction Survey demo to see at a glance the main features of this new technology now available for Office 365 commercial users. I was surprise to see how simple and slick the authoring experience is and of course love the final result. I can see so much power for specific set of scenarios. I just hope that Microsoft consider creating an API for allowing developer build forms and quiz programmatically as well as query the results.

I do see myself building risk matrix surveys (Survey Analysis for Evaluating Risks) for some O365 customers

Invoking User Profile Service when Selecting from People Picker in InfoPath

While supporting a customer on InfoPath development, he ask me how to retrieve data from a specific user using the Profile Web Service, but he want to invoke the service after selecting a user from a people picker control, problem was that the Action section in the people picker control was disable so he was asking why and how can we accomplish what he wants. I remember that I was able to implement same exact scenario a while back ago but didn’t remember how, so I did some basic research and this is what you need to do:

Step 1 – Create another field in the form of type Text (String) and make sure to set the default value equal to the people picker Account ID field, also it is critical to check the Refresh value when formula is recalculated check box control

Step 2 – Create an Action rule in the new text box control, this will get execute any time the people picker control change the continuing Account Id value

Essentially this as the actual concern, so now we are able to have a trigger action in order to query the User Profile Web Service.

Administrator-approved form template, what really happen?

I receive a question around Administrator-approved InfoPath form templates. Here is the answer.

Q. Haaron, what really happen when we upload a new version of an InfoPath form in central admin?

A. When you upload an InfoPath form template using SharePoint Central Administration some things happen:

1. In Manage Form Template you can provision the same version of the form in more than one Site Collection, you can manage the form, activate or deactivate.

IP04

2. It creates a WSP file based on your InfoPath Form Template version and deploys as a farm solution, automatically creates a Site Collection Feature that you can Activate or Deactivate.

IP03

IP05

3. In Manage Form Templates page, when we Activate To a Site Collection basically activate a Site Collection Feature in the target Site Collection, and that provision the form in the Form Templates library.

IP06

4. Behind the scenes, when the WSP is generated SharePoint maintain a version of the form template. That make sense because forms instances can point to older version of the template

IP07

And this behavior is the same for MOSS 2007, SharePoint Server 2010 Enterprise and SharePoint Server 2013 Enterprise.

Because you can succeed, you also can fail

This is just an interesting scenario I’m dealing with.

I’m pretty sure SharePoint can support a state level solution for this problem with the proper infrastructure and procedures in place, but, are you sure the business can support a change like that? Switching from one paper form and manual process to an electronic forms with automated workflow solution requires more than servers and infrastructure, it requires business support and commitment because:

  • You need to define if current print copy approvals still going to be supported
  • The business needs to recognize and agree that electronic signing and workflow approach will be the new way to go instead of paper signing a manual processing
  • How records management and archiving will handle electronic forms if people star using this solution
  • Suddenly you the need of copy printing forms will be less

This are just some questions we need to ask if we are thinking to go to Form Management solution with SharePoint platform.