Repeating section - dont allow users to insert or delete this control in conditional formatting - InfoPath Dev
in

InfoPath Dev

Repeating section - dont allow users to insert or delete this control in conditional formatting

Last post 06-03-2010 11:48 AM by Qazi Anis. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-02-2010 07:51 AM

    Repeating section - dont allow users to insert or delete this control in conditional formatting

    This one is driving me bonkers and it should be simple.  I have tested in other templates and it seems to work as it should.  I have a repeating section which contains a drop down list box that gets its values from an xml file.  I have changed template.xml so that this control will initially display Select...   In the conditional formatting for the repeating section I have said when LanguageChosen (id of the drop down list box) is blank or LanguageChosen = Select... do not allow users to insert or delete this control.  So I am trying to stop the user from inserting a row when LangageChosen = Select... for a row in the repeating section.   However, this is not working...  Any ideas?  Thanks. 

    The whole form uses no code and I would like to keep it that way.  

     

    Filed under: ,
  • 06-02-2010 03:22 PM In reply to

    Re: Repeating section - dont allow users to insert or delete this control in conditional formatting

     the way you mentioned it, it seems you have written a conditional formatting on the repeating section without using eval, if you just specify the field it will take the first occurrence of the field. you will need to use  eval and contains select

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 06-03-2010 07:54 AM In reply to

    Re: Repeating section - dont allow users to insert or delete this control in conditional formatting

    Qazi - thanks I think you may be on to something, I'm still not there though.

    So, in the conditional formatting in the repeating section, I stated the following:  contains(xdMath:Eval(../../group2, "field1"), "Select")  and then I selected dont allow users to insert or delete this control.

    In my view1.xsl file I see that transfers to: 

     <xsl:attribute name="style">
          <xsl:if test="contains(xdMath:Eval(group2, &quot;field1&quot;), &quot;Select&quot;)">msos-xCollection-group2_2-editing:disabled;</xsl:if>
         </xsl:attribute>

     Do you see where I went wrong?

    Thanks

  • 06-03-2010 08:19 AM In reply to

    Re: Repeating section - dont allow users to insert or delete this control in conditional formatting

    Just to clarify - group2 is the name of the repeating group and field1 is the name of the drop down list box inside the repeating group.

     

    DataSource is like this: myFields -> group1 -> group2 -> field1

  • 06-03-2010 11:48 AM In reply to

    Re: Repeating section - dont allow users to insert or delete this control in conditional formatting

     try

    contains(xdMath:Eval(xdMath:Eval(group2, 'concat(my:field1, "; ")'), ".."), "Select")

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.