Archive for November, 2012

25
Nov
12

Unsupported Expression in InfoPath 2010

 

This is a weird one.

Situation:

Going back to a SharePoint 2007 site formerly published with InfoPath 2007.  Downloaded the form template and made some changes.  When I went to re-publish I encountered an “unsupported expression” error.

image

The actual long message was as follows.

The following expression could not be parsed because of a syntax error or because it uses an undefined namespace prefix or unsupported function:  pc:DisplayName

image

This appeared to have been coming from one of the people pickers (circa 2007 variety) but copying the Xpath on each of them yielded no easily identifiable pc:DisplayName.

/my:myFields/my:EmployeeManager/my:Person/my:DisplayName

/my:myFields/my:EmployeeGroup/my:TerminatingEmployee/my:Person/my:DisplayName

I went back to the original template with no changes and it didn’t throw the same error during publishing.

I changed the Form type from Web Browser Form (InfoPath 2007) to InfoPath 2007 Filler Form and attempted publishing.  The error went away.

image

So, I changed it back to Web Browser Form (InfoPath 2007) again…the way it originally was.  The error stayed away and I published the form. 

However, after publishing, the error came back.  Sad smile  So I decided to look “under the covers.”

I saved the XSN as source files and looked within all the files.  I was able to find where the pc: schema infiltrated my form template.  Within view1.xsl I found the offending pc:DisplayName, and all the other related pc: references. 

image

I’m not sure how this made its way into the form template, as I never specifically made this change, nor do I know how one would force this. 

</xsl:if>

                                        <param NAME="ButtonFont" VALUE="Verdana,12,0,400,0,0,0"/>

                                        <param NAME="ButtonText" VALUE=""/>

                                        <param NAME="DisplayNameXPath" VALUE="pc:DisplayName"/>

                                        <param NAME="ObjectIdXPath" VALUE="pc:AccountId"/>

                                        <param NAME="ObjectTypeXPath" VALUE="pc:AccountType"/>

                                        <param NAME="SiteUrlXPath" VALUE="/Context/@siteUrl"/>

                                        <param NAME="SiteUrlDataSource" VALUE="Context"/>

                                        <param NAME="NewNodeTemplate" VALUE="&lt;pc:Person xmlns:pc=&quot;http://schemas.microsoft.com/office/infopath/2007/PartnerControls&quot;&gt;
    &lt;pc:DisplayName&gt;&lt;/pc:DisplayName&gt;
    &lt;pc:AccountId&gt;&lt;/pc:AccountId&gt;
    &lt;pc:AccountType&gt;&lt;/pc:AccountType&gt;
&lt;/pc:Person&gt;"/>

                                        <param NAME="BackgroundColor" VALUE="2147483653"/>

                                        <param NAME="MaxLines" VALUE="4"/>

                                        <param NAME="Direction" VALUE="0"/>

I did a simple “find and replace” on all the pc: occurrences with my: and saved and tested my work.  All appears to be okay.

Sure would be nice to know how this happens!

Advertisements
21
Nov
12

InfoPath Blog Silent?

Is it just me, or has anyone noticed the InfoPath team blog at http://blogs.msdn.com/b/infopath/ has been silent for the last year and a half?  Did they move it somewhere else when I wasn’t looking?  Or, did I finally look up for a minute, only to find the world has passed me by…again?

21
Nov
12

Site Navigation Settings Missing in SharePoint 2007 Using IE9

So let’s say you are using IE9 and you go to the Site Navigation Settings page on a 2007 SharePoint site and see this:

image

And you scratch you head and wonder, “Where are all my navigation settings?”  Perhaps you did this many moons ago and you think it’s just old age setting in.  But a little Googling indicates you aren’t going crazy (or senile) and there’s some JavaScript issue with the page.

Try this.  Start IE9 without any add-ons by executing

iexplore –extoff

Then, navigate to the same page and voilà, your navigation editing area appears!

image

This must be due to some malcontent add-on.

Enabling and disabling add-ons and refreshing your page brings you to NameCtrl Class being the add-on that seems to be causing the problem.  Disabling this add-on fixes the issue…at least it did for me!

image

 

Search terms:

NameCtrl Class Microsoft Corporation

Add-on issues with IE9 and SharePoint 2007 navigation




Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

November 2012
M T W T F S S
« Oct   Mar »
 1234
567891011
12131415161718
19202122232425
2627282930  
Support Wikipedia
Advertisements