Conditional Formatting does not work - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Conditional Formatting does not work

Last post 05-15-2009 07:40 AM by miceagol. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 06-12-2007 10:15 AM

    Conditional Formatting does not work

    Hello Board,

     i've a problem with "Conditional Formatting" in a web enabled Form. Im working with VS / VSTO. When I set an "Conditional Formatting Rule" to disable a control, publish that form (signed and fully trusted) as administrator approval form and then try to upload it in the central form library I get an "unknown error" durring the upload or validate process. If I remove the Conditional Formatting Rule everything works fine. I tried to use the rule with a section or with a simple textbox: no success. I'm using a XSD schema as input for my primary datasource.

     Can someone help me?  This could be a showstopper for me :-(

    Kindly regards

     Michael

  • 06-12-2007 11:46 AM In reply to

    Re: Conditional Formatting does not work

    A good thing is to check the server logs to see if there are more details about the unknown error you are seeing.

    Forms Server uses the SharePoint log files (typically located under %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\12\LOGS) with Area="Forms Server".

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-12-2007 12:29 PM In reply to

    • jdogan
    • Not Ranked
    • Joined on 01-15-2007
    • USA
    • Posts 9

    Re: Conditional Formatting does not work

    Michael,

     I have been able to get conditional formatting to work on browser-enabled forms before. Specifically, I am able to hide a section depending on a value in my data source. I haven't gotten any more in-depth than that, but maybe its something specific to the type of control you are trying to format?

    Jason

  • 06-12-2007 02:05 PM In reply to

    Re: Conditional Formatting does not work

    Hello,

    thank's very much for your answers. I turned on logging so that I'm able to see where the exception s thrown. I attached the part of the log at the end of this post. For me it looks like, that the Form itself may be ok but the deploymentprocess (perhaps the XSNFeatureReceiver) is failing.

    Perhaps someone can dig some more infos out of that log snippet.

    @Jason: I'm happy to hear that it is possible. I hope we can find out the problem.

     

    Regards Michael

     06/12/2007 22:37:20.22     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82lx    Exception    ConstructFromXsnFile failed with unhandled exception System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.LocateXPathInSnippet(SnippetNavigator currentContext, SnippetNavigator snippetContext, ParsedXPath xPath, Solution solution)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.LocateXPathInSnippet(SnippetNavigator currentContext, SnippetNavigator snippetContext, ParsedXPath xPath, Solution solution, Boolean addNodesNotInSnippet)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourceInSnippet(ParsedXPath source, SnippetNavigator initialTarget, SnippetNavigator currentContext, Dictionary`2 filterContexts, Solution solution, Boolean& notAllSourcesAreSimplePaths) ...     
    06/12/2007 22:37:20.22*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82lx    Exception    ...    bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourcesInSnippetInternal(View view, SnippetNavigator target, ParsedXPath expression, String& expressionName, AutoAnnotate autoAnnotate, Solution solution, PostbackReason& postbackReason)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourcesInSnippet(View view, SnippetNavigator target, ParsedXPath expression, String& expressionName, AutoAnnotate autoAnnotate, Solution solution, PostbackReason& postbackReason)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.ConditionalFormattings.AnnotateView(Solution solution, View view)     bei Microsoft.Office.InfoPath.Server.Converter.SolutionConverter.ConvertView(Solution solution, ConverterDocument converterDocument)     bei Microsoft.Office.InfoPath.Server.Conv...     
    06/12/2007 22:37:20.22*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82lx    Exception    ...erter.SolutionConverter.ConvertSolution(Solution solution)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.Solution.<>c__DisplayClass2.<ConstructFromXsnFile>b__0()     bei Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)     
    06/12/2007 22:37:20.22     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         93w6    Verbose     Recursion: Leaving solution converter view visitors. FormTemplate: urn:schemas-microsoft-com:office:infopath:A9999:http---COMPANYNAME-de-2007-PRODUCTNAME-Forms-A7140-v0-1     
    06/12/2007 22:37:20.36     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         8jc7    Medium      Deployment failed conversion, or design checker found fatal errors: Unerwarteter Fehler beim Überprüfen der Formularvorlage.     
    06/12/2007 22:37:20.38     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            8z3p    Verbose     Calling GlobalStorage.SetItem with index IsConversionInProgress value type Boolean.     
    06/12/2007 22:37:20.50     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82mn    Exception    TryRunConversion failed with unhandled exception System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.LocateXPathInSnippet(SnippetNavigator currentContext, SnippetNavigator snippetContext, ParsedXPath xPath, Solution solution)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.LocateXPathInSnippet(SnippetNavigator currentContext, SnippetNavigator snippetContext, ParsedXPath xPath, Solution solution, Boolean addNodesNotInSnippet)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourceInSnippet(ParsedXPath source, SnippetNavigator initialTarget, SnippetNavigator currentContext, Dictionary`2 filterContexts, Solution solution, Boolean& notAllSourcesAreSimplePaths)     ...     
    06/12/2007 22:37:20.50*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82mn    Exception    ...bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourcesInSnippetInternal(View view, SnippetNavigator target, ParsedXPath expression, String& expressionName, AutoAnnotate autoAnnotate, Solution solution, PostbackReason& postbackReason)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourcesInSnippet(View view, SnippetNavigator target, ParsedXPath expression, String& expressionName, AutoAnnotate autoAnnotate, Solution solution, PostbackReason& postbackReason)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.ConditionalFormattings.AnnotateView(Solution solution, View view)     bei Microsoft.Office.InfoPath.Server.Converter.SolutionConverter.ConvertView(Solution solution, ConverterDocument converterDocument)     bei Microsoft.Office.InfoPath.Server.Converte...     
    06/12/2007 22:37:20.50*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82mn    Exception    ...r.SolutionConverter.ConvertSolution(Solution solution)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.Solution.<>c__DisplayClass2.<ConstructFromXsnFile>b__0()     bei Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)     bei Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(ULSTagID tagID, ULSCat categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.Solution.ConstructFromXsnFile(SolutionCabinet solutionCabinet, SolutionIdentity solutionId)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDo...     
    06/12/2007 22:37:20.50*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82mn    Exception    ...main.OperationRunner.ExecuteConversion(SolutionCabinet solutionCabinet, SolutionIdentity solutionId, Boolean executeVerification)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.OperationRunner.ExecuteConversion(SolutionCabinet solutionCabinet, SolutionIdentity solutionId, Boolean executeVerification)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.ExecuteInRemote(AppDomain domain, SolutionCabinet solutionCabinet, SolutionIdentity solutionId)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.<>c__DisplayClass4.<TryRunConversion>b__0()     bei Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBloc...     
    06/12/2007 22:37:20.50*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         82mn    Exception    ...k)     
    06/12/2007 22:37:20.52     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            82mk    Exception    LoadDocumentAndPlayEventLog failed with unhandled exception System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.LocateXPathInSnippet(SnippetNavigator currentContext, SnippetNavigator snippetContext, ParsedXPath xPath, Solution solution)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.LocateXPathInSnippet(SnippetNavigator currentContext, SnippetNavigator snippetContext, ParsedXPath xPath, Solution solution, Boolean addNodesNotInSnippet)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourceInSnippet(ParsedXPath source, SnippetNavigator initialTarget, SnippetNavigator currentContext, Dictionary`2 filterContexts, Solution solution, Boolean& notAllSourcesAreSimple...     
    06/12/2007 22:37:20.52*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            82mk    Exception    ...Paths)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourcesInSnippetInternal(View view, SnippetNavigator target, ParsedXPath expression, String& expressionName, AutoAnnotate autoAnnotate, Solution solution, PostbackReason& postbackReason)     bei Microsoft.Office.InfoPath.Server.Util.ViewPathUtils.FindSourcesInSnippet(View view, SnippetNavigator target, ParsedXPath expression, String& expressionName, AutoAnnotate autoAnnotate, Solution solution, PostbackReason& postbackReason)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.ConditionalFormattings.AnnotateView(Solution solution, View view)     bei Microsoft.Office.InfoPath.Server.Converter.SolutionConverter.ConvertView(Solution solution, ConverterDocument converterDocument)     bei Microsoft.Office.InfoPath.Serv...     
    06/12/2007 22:37:20.52*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            82mk    Exception    ...er.Converter.SolutionConverter.ConvertSolution(Solution solution)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.Solution.<>c__DisplayClass2.<ConstructFromXsnFile>b__0()     bei Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)     bei Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(ULSTagID tagID, ULSCat categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock)     bei Microsoft.Office.InfoPath.Server.SolutionLifetime.Solution.ConstructFromXsnFile(SolutionCabinet solutionCabinet, SolutionIdentity solutionId)     bei Microsoft.Office.InfoPath.Server.Converter.Conv...     
    06/12/2007 22:37:20.52*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            82mk    Exception    ...ersionAppDomain.OperationRunner.ExecuteConversion(SolutionCabinet solutionCabinet, SolutionIdentity solutionId, Boolean executeVerification)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.OperationRunner.ExecuteConversion(SolutionCabinet solutionCabinet, SolutionIdentity solutionId, Boolean executeVerification)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.ExecuteInRemote(AppDomain domain, SolutionCabinet solutionCabinet, SolutionIdentity solutionId)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.<>c__DisplayClass4.<TryRunConversion>b__0()     bei Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock ...     
    06/12/2007 22:37:20.52*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            82mk    Exception    ...finallyBlock)     bei Microsoft.Office.Server.Diagnostics.ULS.SendWatsonOnExceptionTag(ULSTagID tagID, ULSCat categoryID, String output, Boolean fRethrowException, TryBlock tryBlock, CatchBlock catchBlock, FinallyBlock finallyBlock)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.TryRunConversion(SolutionCabinet solutionCabinet, SolutionIdentity solutionId, Boolean separateAppDomain)     bei Microsoft.Office.InfoPath.Server.Converter.ConversionAppDomain.RunConversion(SolutionCabinet solutionCabinet, SolutionIdentity solutionId, Boolean separateAppDomain)     bei Microsoft.Office.InfoPath.Server.Util.InstalledSolutions.<>c__DisplayClass1.<VerifyUnpackedSolution>b__0()     bei Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowExcept...     
    06/12/2007 22:37:20.52*    w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            82mk    Exception    ...ion, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)     
    06/12/2007 22:37:20.52     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         4n00    Verbose     ConversionAppDomain: Unload AppDomain - begin     
    06/12/2007 22:37:20.77     w3wp.exe (0x0F78)                           0x0F8C    Forms Server                      Forms Services Runtime            89mj    Medium      Forms Server Conversion AppDomain is unloading.     
    06/12/2007 22:37:20.89     w3wp.exe (0x0F78)                           0x0F8C    ULS Logging                       Unified Logging Service           72py    Verbose     Decremented a handle count in Perfmon Memory     
    06/12/2007 22:37:20.94     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Deployment         4n01    Medium      ConversionAppDomain: Unload AppDomain - end.     
    06/12/2007 22:37:20.94     w3wp.exe (0x0F78)                           0x0A68    Forms Server                      Forms Services Runtime            8z3p    Verbose     Calling GlobalStorage.SetItem with index IsVerificationInProgress value type Boolean.     

     

     

  • 06-12-2007 02:14 PM In reply to

    Re: Conditional Formatting does not work

    Hello Michael,

    From looking at the log, it looks like you are hitting a bug in InfoPath Forms Server. It is mostly caused by Forms Server choking on one of the xpaths generated by your conditional formatting. I would be extremely curious to see the solution you have, would it be possible to share it out?

    A few questions:

    - did you design the solution from scratch in InfoPath 2007 or did you import and convert an existing InfoPath 2003 solution?

    - did you manually modify the solution (by extracting the files and editing the view xsls/manifest)?

    The best thing for you would be to probably play around with your conditional formatting to work around the bug but I cannot tell you more details unless I could see the solution itself :)

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-12-2007 02:32 PM In reply to

    Re: Conditional Formatting does not work

    Hello Davidair,

     

    thanks for your suuuuuuuuupppper fast response. I'll will try to share that solution but I have to ask before. I think it will be possible to do a private share if you send me your email.

    I didn't modify the generated form file and my Conditional formatting expression is extrem simple. It looks like  baseMsg:Status = "ENTWURF"

    The form was completly developed in IP2007. 

  • 06-12-2007 03:02 PM In reply to

    Re: Conditional Formatting does not work

    If you cannot share out the entire solution try to see if you can simplify it while still getting the error - remove business logic, extra controls and aux-doms... 

    Or other approach is to create a very simple solution, add the conditional formatting that you have there and see if it crashes the Forms Server.

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-12-2007 03:21 PM In reply to

    Re: Conditional Formatting does not work

    Hello,

    I can share the solution, I just preparing it for you. I played a little bit around like you advised me and I found out that an expression of "1=1" works like a charme but as soon as I use some Xpath it makes boom.

     I have a litte speciality which could be relevant. I have three schema files. BaseTypes which contains enterprose wide Types. This file is imported by BasicMessage which imports the BaseTypes and defines the core structure for our InfoPath Forms. The BasisMessage has an abstract element payload which is defined in the third schema file. This file defines the individual form Data which jumps into the abstract part of the BasisMessage. So I have two schema files which are fixed over all forms and one individuall schema for each form. My XML Tools tell me, that my schema structure everything is ok ;-) InfoPath accepts them without any error except using Conditional Formatting.

     I will keep you up2date. Contact me if you would like to see the solution

     

    Regards Michael 

  • 06-12-2007 03:29 PM In reply to

    Re: Conditional Formatting does not work

    Very interesting! My guess is that your schemas is what really causes the problem - although InfoPath has no problems with them, InfoPath Forms Server fails to process those schemas and therefore it fails whenever you start using xpaths on those. I would not be surprised if you also had problems with Rules and Calculations or Expression Boxes (let me know if this is the case).

    In any event I would love to see your solution, especially the schema setup. The "abstract element payload" could be what kills the Forms Server. You can email me at davidair at qdabra d0t com.

     

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-12-2007 03:52 PM In reply to

    Re: Conditional Formatting does not work

    It's a crazy thing! I just found out, that the "Conditional Formatting Expressions" which are added by InfoPath itself (when I used digital signatures and set the option "set fields read only after sign" = true) are working fine.

    When I try to use the same expression and and them manually to another field it makes boom. !?!?!?

     I'll send you the solution setup soon

     
    Regards Michael
     

  • 06-12-2007 03:59 PM In reply to

    Re: Conditional Formatting does not work

    Uups, rollback. It seems to work if I use the same type of expressions which are used when InfoPath looks for digital signatures.

     This works:

    xdXDocument:GetNamedNodeProperty(/ns3:A7140Message/baseMsg:MessageHeader/baseMsg:Fachlich, "AngeforderterStatus", "ENTWURF") = "ENTWURF"

    This works not:

    ../../../baseMsg:MessageHeader/baseMsg:Fachlich/baseMsg:AktuellerStatus = "ENTWURF" (autogenerated by Infopath)

    and this works not too.

    /baseMsg:MessageHeader/baseMsg:Fachlich/baseMsg:AktuellerStatus = "ENTWURF"

    //baseMsg:MessageHeader/baseMsg:Fachlich/baseMsg:AktuellerStatus = "ENTWURF"

    Kindly regards

     

    Michael 

  • 06-12-2007 08:12 PM In reply to

    Re: Conditional Formatting does not work

    Hello Michael,

    Thank you for sending me your solution, I have looked at it and the problem is indeed a schema issue: your schema is too complex for InfoPath Forms Server to handle correctly.

    I have created a simple repro of the problem by simply creating a new empty solution from your schema, dragging a few controls into the view and adding conditional formatting. It broke.

    Hint: it is a great help to catch errors earlier directly from InfoPath by doing the following:

    1. View | Design Tasks

    2. Designer Checker

    3. Change Compatibility Settings, enter the URL of the server running Forms Services

    Now InfoPath will contact the server and attempt to validate your solution. If there are any catastrophic errors like the one you're seeing, you'll get it sooner.

    Also, watch out for the browser optimization issues (make sure to click Options | "Show Browser Optimization Messages" at the bottom of the Designer Checker) - you have a lot of them which indicates that your form performance will be bad. Whenever you edit the affected controls, the form will do a server postback. Reason? The controls xpaths point into a schema that is too complex for IPFS to handle.

    So my suggestion is to simplify your schema if at all possible by getting rid of abstract types. This should fix all of your conditional formatting problems. Please let me know if you would like me to try and forward your schemas to Microsoft for additional analysis. I'll reply to your e-mail with a simple repro of the bug you're hitting.

    David.

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-13-2007 07:24 AM In reply to

    Re: Conditional Formatting does not work

    Hello David,

    thank you for your effort. I played around with the schema and removed the abstract types but still using the BasicMessage Type as source for the individual form types. This seems to work and I still can cast my deserialized form xml to BasicMessage class and work with them without knowing the concrete type.:-) I'll send you the current xsd files tonight or tomorrow so that you can take a look yourself.

    Feel free to send my schema to MS for further investigation and keep me up2date please.

    Kindly regards Michael

  • 06-13-2007 10:55 AM In reply to

    Re: Conditional Formatting does not work

    Very cool, I am glad you were able to find a workaround. I will keep you posted if I find out more about this!
    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 05-15-2009 07:40 AM In reply to

    Re: Conditional Formatting does not work

    Sorry for bumping this old thread, but I have the same problem when uploading my form to the forms server:
    Object reference not set to an instance of an object. at Microsoft.Office.InfoPath.Server.SolutionLifetime.ConditionalFormattings.GetSourceSnippetElements(List`1 sourceSnippets, List`1 sourceSnippetElements)
    So the error has been pinpointed to a conditional formatting in the form, ok. But is there any way of finding which conditional formatting that is causing the problem? I have so many. :(
Page 1 of 1 (15 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.