Conditional Formatting Does Not Work After Edit - InfoPath Dev
in

InfoPath Dev

Conditional Formatting Does Not Work After Edit

Last post 03-17-2009 08:09 AM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 03-12-2009 10:51 AM

    • xml27
    • Not Ranked
    • Joined on 03-12-2009
    • Posts 6

    Conditional Formatting Does Not Work After Edit

    Hello,

     I have created a form template that uses conditional formatting to prevent the insertion of an optional section if a previous optional section does not exist. I had the formatting working perfectly. However, if I go in and make any type of change (add an optional section, etc...) to the template and preview, the conditional formatting no longer works. The change made would seem to have no relation to the logic I am using in the conditional format. But, it breaks it. Could this be a bug or am I missing something?

    Windows XP Pro SP2 

    InfoPath 2007 (MS-Office 2007 SP1)

    Form is designed for Forms Server but exhibits the same behavior either through forms server of full client.

     Thanks for your time.

  • 03-12-2009 02:28 PM In reply to

    Re: Conditional Formatting Does Not Work After Edit

    Hi, and welcome:

    Can you post your form (when you reply to a post, under the Options tab you'll find a place to upload a file)? If not, can you give us more information about what the condition is for the conditional formatting? This happens no matter what the change -- like even adding a button?

    Hilary Stoupa

  • 03-12-2009 07:25 PM In reply to

    • xml27
    • Not Ranked
    • Joined on 03-12-2009
    • Posts 6

    Re: Conditional Formatting Does Not Work After Edit

    Thanks for your reply. That is correct. Any change to the form whatsoever, even adding a blank line breaks the conditional formatting???? In my form, you will see the optional sections marked Step 1, Step 2, etc... I have conditional formatting on the optional section for step 2 that checks content for step 1 before allowing it to open. The form works fine as is. But if I make any change anywhere the formatting breaks and you cannot open Step 2 even if the conditions are met.

     Thanks for taking a look.

  • 03-12-2009 07:34 PM In reply to

    • xml27
    • Not Ranked
    • Joined on 03-12-2009
    • Posts 6

    Re: Conditional Formatting Does Not Work After Edit

    Also, there is conditional formatting on all of the optional sections for each step. Based upon how wierd the form is behaving, I guess I can't rule any of those out as well?

     

    Thanks again.

  • 03-13-2009 08:16 AM In reply to

    Re: Conditional Formatting Does Not Work After Edit

    First off, nice looking form! Second off, you are not crazy -- I am seeing exactly the same thing on my machine. I started a new blank form for comparison and added two optional section, making the ability to add / remove one dependent upon the presence of the other (like you have in your form) and it worked beautifully. On your form, I added some expression boxes with the conditional formatting requirements for section 2 -- when all 4 evaluated to false, I anticipated the conditional formatting would not apply and I'd be able to add section 2 -- no luck.

    However, when I copied section 1 and 2 into a new view in the same form, the conditional formatting worked as I'd anticipate. That makes me think there is some other rule or condition in the form causing your issue. You may want to try this -- create a new view, and start copying your sections over, previewing as you go, watching to see when things stop working....

    Hilary Stoupa

  • 03-13-2009 08:48 AM In reply to

    • xml27
    • Not Ranked
    • Joined on 03-12-2009
    • Posts 6

    Re: Conditional Formatting Does Not Work After Edit

    Thanks for confirming the behavior and that it is something in the form. I will try the systematic approach you suggested and follow up.

     

    Thanks for your time.

  • 03-15-2009 05:02 AM In reply to

    • xml27
    • Not Ranked
    • Joined on 03-12-2009
    • Posts 6

    Re: Conditional Formatting Does Not Work After Edit

    I tried the methodical approach and determined that the form will break after adding a 4th step (even if it is not the original 4th step). So I figured it was an issue with the 3rd step. But I did the test again and when I go t to the point where I would have added the 3rd step, I instead added the 5th and 6th. Still broken when trying to open step 2.

     One of my developers looked into it further and is able to fix the problem by modiftying the source xsl file. She stated that when an item is added to to the form, the last line in the XSL for some reason becomes the first and that is what throws it off. Does that make any sense? Could it be a problem with my data sources and how they are nested? I do not want to have to edit the source everytime we make a change to the form.

     Thanks for your time.

  • 03-17-2009 06:54 AM In reply to

    • xml27
    • Not Ranked
    • Joined on 03-12-2009
    • Posts 6

    Re: Conditional Formatting Does Not Work After Edit

    I may have figured it out. I had other conditional format inside of sections that were not being messed up when the form was edited. I wrapped all of my conditionally formatted optional sections inside of static sections and it appears to work! I have made numerous changes to the form and it has yet to break. Perhaps it is a glitch in how conditional formatting works on "root" or "top level" optional sections?

    If you don't hear back from me. Assume this was the fix.

     Thanks for your time.

  • 03-17-2009 08:09 AM In reply to

    Re: Conditional Formatting Does Not Work After Edit

    I am glad to hear you've got it sorted....and thanks for posting your fix!

    Hilary Stoupa

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.