K2 Error: The solution has not been opened. The following error occurred on opening: Value cannot be null.
By peter.stilgoe
When in K2 Blackpoint or K2 Blackpearl you are using a Infopath Integration Wizard and when you try to specify the Infopath form template you get the error:
“The solution has not been opened. The following error occurred on opening: Value cannot be null.
Parameter name: adapter”
Delete your submit data connection in your Infopath form, you should then be able to add your Infopath form template to your K2 process with no error.
Error occured Accessing Data Source Error ID 5566
By peter.stilgoe
If you are getting the error when opening an Infopath Form ‘Error occured Accessing Data Source Error ID 5566′ its normally an authentication issue with the datasource the form is trying to retrieve data from. This normally occurs in ‘cross domain’ environments. The fix for me was to disable the ‘Authentication Loopback’ check:
1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3. Right-click Lsa, point to New, and then click DWORD Value.
4. Type DisableLoopbackCheck, and then press ENTER.
5. Right-click DisableLoopbackCheck, and then click Modify.
6. In the Value data box, type 1, and then click OK.
7. Exit Registry Editor.
8. Restart the computer.
More From pstilgoe
Populating an Infopath dropdown using a specific Sharepoint list view
By peter.stilgoe
If you have a Sharepoint list containing multiple views, one view shows all approved items and another view shows all items that are pending approval. You have an Infopath form where you have a dropdown control that you want to be populated with only ‘Approved’ list items from your Sharepoint list.
If you create your Infopath data connection & copy the URL to this list view as your source you will notice it still returns ALL items as opposed to your filtered view listing only the approved items.
The way round this is to create you data connection using an XML source, use this link to find out how to view your list data as XML and get the source URL – http://www.petestilgoe.com/2009/11/converting-a-sharepoint-list-into-xml/
Now you need to expand on this & add the particular view to the url to make the data connection get the filtered data for you.
Currently your URL looks something like this:
/_vti_bin/owssvr.dll?Cmd=Display&List={GUID}&XMLDATA=TRUE&noredirect=true
1) Now in your Sharepoint list click ‘Settings’ –> ‘List Settings’
2) Scroll down to the bottom & click on the view you want to use as your datasource
3) Now your URL contains the {List GUID} as well as the {View GUID}
eg. /_vti_bin/owssvr.dll?Cmd=Display&List=%7BD66DCB51%2D80B0%2D43AB%2DB80B%2DCD7D23E63B09%7D&View=%7B6D0CEF69%2DF899%2D40D0%2D86B2%2D6E01CC7D9CA1%7D&XMLDATA=TRUE
4) The URL is encoded so you will need to replace “%7B” with “{” and “%7D” with “}” and “%2D” with “-” so now your url will look something like
/_vti_bin/owssvr.dll?Cmd=Display&List={D66DCB51-80B0-43AB-B80B-CD7D23E63B09}&View={6D0CEF69-F899-40D0-86B2-6E01CC7D9CA1}&XMLDATA=TRUE
5) Use this url as your XML data source in Infopath and your drop down data will be filtered as per your chosen view.
More From pstilgoe
How to autopopulate Infopath fields using Sharepoint list data
By peter.stilgoe
1) Get your Sharepoint list into XML format
2) Set up a data connection using the above XML file as your datasource
3) Now you need to configure rules and filters on your list box. Let’s say that your list box has customer name and you wish to fill a field with the customer phone. When you set your rule, you would first select Set a field’s value then select the field where you want the phone number.
4) To filter for the correct phone number, select the formula button next to the Value field. In the formula window, select Insert Field or Group.
5) Select your secondary data source and the phone number field. Select the Filter Data button. Select Add.
6) In the first drop down, select the customer name field from your secondary data source. Leave the middle one set to Is equal to. For the third drop down, select the field on your form that is bound to the control with the customer name in it.
At this point, what you are basically telling the rule is: Go get me a phone number. I want it to belong to the same customer as the one I just selected in my List Box.
If your datasource is fairly static, when creating the data connection for the XML file in the Data Connection Wizard, ensure that the option to Include the data as a resource file in the form template or template part is selected. This will enhance the speed of your data queries to your datasource significantly.
Steps taken from Hilary Stoupa over @ InfopathDev.com
More From pstilgoe
InfoPath Contact Selector – Limitations & Workarounds – Part 1
By peter.stilgoe
The contact selector available in InfoPath is a very useful control but has some pretty big feature limitations which will hopefully be rectified in Sharepoint 2010 / InfoPath 2010 but I havent had time to check yet.
How to make the InfoPath contact selector mandatory – http://www.myriadtech.com.au/blog/Alana/Lists/Posts/Post.aspx?ID=16
Limit the number of names a user can enter into the InfoPath contact selector – http://www.myriadtech.com.au/blog/Alana/Lists/Posts/Post.aspx?ID=13
Using the InfoPath contact selector to get other users details eg Dept, Office, Manager etc from the User Profile Database – http://www.myriadtech.com.au/blog/Alana/Lists/Posts/Post.aspx?ID=15
More From pstilgoe
Change InfoPath View Before Uploading Form Using K2 Blackpoint
By peter.stilgoe
In your activity add a ‘Data Event Wizard’
Data Replication –> Transfer Data
Click ‘Assign’
Set the ‘Source’ as the name of the InfoPath view you want to switch to
Expand ‘_K2′ & set the ‘Destination’ to the ‘DocumentView’ field
Now when you save your form in a document library it will be saved on the view you set it as. Ideal for submitting forms as read only once the process is complete.
More From pstilgoe
K2 The form template cannot be opened in the InfoPath designer, because InfoPath is not installed on the machine
By peter.stilgoe
Go to “Software\Microsoft\Windows\CurrentVersion\App Paths\InfoPath.exe” in your registry (if infopath.exe does not exist create it), there you will see a “Path” value if you do not then create a new string value with the the name “Path” and in the “Value Data” portion add the path to the infopath exe folder, for example, “C:\Program Files (x86)\Microsoft Office\Office12\
Also in the ‘Default’ string add the path with the actual filename ie. “C:\Program Files (x86)\Microsoft Office\Office12\infopath.exe”
Now close K2 designer & reopen, you will now be able to edit Infopath forms from within K2
More From pstilgoe
How to auto populate InfoPath forms using the people picker
By peter.stilgoe
Step 1:Add the Contact Selector control to InfoPath – this only has to be done once within InfoPath, then it will be available for future forms.
1. From the Controls task pane, click on “Add or Remove Custom Controls…” then click Add.
2. Select “ActiveX Control” then click Next.
3. Locate “Contact Selector” in the list, select it, then click Next.
4. Ensure “Don’t install a .cab file” is selected, click Next.
5. Set the Binding Property to “Value”, click Next.
6. In the drop-down menu for field or group type, select “Field or Group (any data type)” then click Finish.
7. Click Close, click OK.
Step 2: Add a data connection – this must be done for each new form created.
There is some preliminary work here, first you have to create an XML file and save it. Open notepad and paste:
More From pstilgoe
Use Form View when configuring session state for InfoPath Forms Services
By peter.stilgoe
You can configure InfoPath Forms Services to use the Session State Service (the default option) or Form View to control how user sessions are managed. When you configure InfoPath Forms Services to use the Session State Service, all browser sessions are maintained on the SQL Server database corresponding with the Shared Services Provider (SSP) associated with the Web application on which the form template is hosted. This scenario uses little network bandwidth, but has a cumulative performance impact on the computer running SQL Server. When you are using Form View, sessions are maintained on the client browser, and all session data is included in each postback to the server, up to 40 kilobytes of session data. This uses more bandwidth than using session state, but does not affect the computer running SQL Server. Once session data reaches 40 KB in size, the session automatically transitions to session-state management.
We recommend the use of Form View in environments that have smaller groups of users, because it reduces the impact on SQL Server. If your InfoPath Forms Services deployment will have many users, particularly if session data is below 40 KB for many high-usage form templates, session state is likely a better choice. If Form View is used, the bandwidth used by browser sessions of 40 KB or fewer can be monitored if there is a concern that network performance might be adversely affected.
More From pstilgoe
Auto populate your InfoPath form with the current user name
By peter.stilgoe
You want to a user file in your InfoPath form to auto populate with the current user who is logged on, follow these steps:
1) Create a new form by Designing a New Form Template
2)Choose blank form
3) Add a text box to the form (Field1)
4) Go to Tools | Form Options
5) Go to the Open Behavior section and click on Rules
6) Add Action to Set a Field’s Value
7) Choose the field you added above as the field to populate
8 ) For the value, click on the Fx button and choose Insert Function
9) View All in the Categories drop down
10) At the bottom you’ll see userName, pick it
11) The formula that gets dropped in is userName()
12) Preview the form, you’ll see your UserName in field1
More From pstilgoe
InfoPath Performance Tips
By peter.stilgoe
Upgrade to IE7 on the desktop. There are performance benefits to moving up to IE7. In some cases the difference is 5x to 10x.
Make sure the IE cache is big enough so our necessary 250K of content and scripts needed for the browser to render Forms Services forms – doesn’t get pushed out the cache after an initial download. Customers with extraordinarily low thresholds (like ~1MB) will have issues. Disk is cheap, increase that value to something reasonable like 10% of disk.
A good perf trick is to populate dropdowns via an XML file (especially if they are somewhat static) that is made a part of the form XSN. We can cache that on the server and get good load performance optimization. You can always republish the solution when the data changes.
If you have to download data via a data connection for a dropdown list or calculation, try to dynamically build a filtered query (via code) so that you are as efficient as possible with what you are retrieving.
Try to minimize On_Load activities like queries unless absolutely necessary.
Conditional visibility logic has some known performance problems. A hotfix is available http://support.microsoft.com/kb/937206, which is manifested in a modifed 250K initial download when accessing Forms Services the first time. The performance issue is related to the IE Script Engine and occurs at the browser level, not server-side.
Instead of using conditional visibility logic, try implementing multiple views on a form. Splitting complex views into more than 1 view provides noticeable performance improvements.
Rich Text controls are noticeably slower in IE vs. Firefox, because Rich Text editing in Forms Services is an IE-only feature. Limiting the number of Rich Text controls shown in the same view can really help form performance.
Try to prevent unnecessary roundtripping between the form browser and the server. There are several round trip switches available on controls. See the Browser Forms Tab on a given control to expose finer-grained options over the behavior. Note what the warning messages you receive say about the form’s potential round trip behavior when admin deploying the form. It will tell you when multiple server roundtrips will be likely to occur when using your form.
If you have to do roundtrips to the server, try to have them triggered by buttons, so that the users know they initiated the wait themselves. This UI trick can tend to reduce user dissatisfaction with the form performance.
Try not to treat an InfoPath form as a full, rich VB application. It’s not designed to be performant in that use case.
The more declarative logic (heavy use of rules, etc.) and managed code you have in the form, the slower it will be. Try and follow the KISS method if at all possible (Keep it Simple, Stupid).
Consider breaking out the server role of Forms Services to another machine on the MOSS farm. Services such as indexing and query serving, or high file I/O operations can really impact the ability of Forms Services to get a time slice and perform properly.



July 21st, 2011
