in

InfoPath Dev

Template Part schema changes when inserted into a form?

Last post 07-09-2008 08:40 PM by smaus. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-03-2008 07:45 PM

    • smaus
    • Not Ranked
      Female
    • Joined on 05-03-2008
    • Bellevue, WA
    • Posts 5

    Template Part schema changes when inserted into a form?

    I'm struggling with my template parts.

    It seems that every time I add my template part into a new form, it loses the schema context.  Let me explain.

    In my template part I have the following Schema:

    • UserGroup (repeating group)
      • UG_ServerName
      • UG_ApplicationName

    In the conditional formatting of UG_Server, I have the following expression set to hide the text-box control:

    my:UG_ServerName = preceding-sibling::my:UserGroup/my:UG_ServerName

     

    This hides the text-box if the value is the same as the same text-box in the preceding record which results in a sort of outline-style table.

    This works great in the template part.  And it works great if I use the same expression in a form template.  The problem is when I try to insert the template part into a new form template, the expression changes to:

    my:UG_ServerName = my:UG_ServerName 

    This clearly, is always going to return as true.  I've tried putting it into its own group.  I've tried using sections.  I can't figure for the life of me how to fix it.

     

  • 06-22-2008 07:27 AM In reply to

    Re: Template Part schema changes when inserted into a form?

    Hello:

    Were you ever able to resolve this? I replicated this and had the same results. I then updated Office 2007 to SP 1, just in case there was a fix in there, but still had the same results. I looked at the source files for the template part, and saw that the .ict file had the following line in it:
    <xsl:when test="relXpath:UG_ServerName = relXpath:UG_ServerName">DISPLAY: none</xsl:when>

    And the actual XSL had this:
    <xsl:when test="my:UG_ServerName = preceding-sibling::my:UserGroup/my:UG_ServerName">DISPLAY: none</xsl:when>

    So, obviously, the .ict isn't reflecting the XSL....

    Hilary Stoupa / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
    Filed under: ,
  • 07-09-2008 08:40 PM In reply to

    • smaus
    • Not Ranked
      Female
    • Joined on 05-03-2008
    • Bellevue, WA
    • Posts 5

    Re: Template Part schema changes when inserted into a form?

    No, was never able to resolve this issue.  It must have something to do with the preceding-sibling function.  Since Template Parts are embedded as section, and therefore, nodes, InfoPath must be trying to level the formulas and expressions when a Template Part is added to a form.

    -Ann

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