Help with preceding-sibling - InfoPath Dev
in

InfoPath Dev

Help with preceding-sibling

Last post 06-14-2012 01:28 PM by robwett. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-13-2012 09:42 PM

    Help with preceding-sibling

    In the attached form I have a couple formatting rules I'm trying to apply based on the preceding-sibling value. It looks like it should work but it's not.

    The conditions I'm trying to apply are:
    preceding-sibling::my:field1 = ""
    AND
    preceding-sibling::my:UniqueRowGuid = my:UniqueRowGuid.

    I tried it with preceding-sibling::my:UniqueRowGuid = current()/UniqueRowGuid and got the same results.

    Any help I can get on why these rules aren't running correctly would be much appreciated. Thanks in advance -robwett
  • 06-14-2012 12:49 AM In reply to

    Re: Help with preceding-sibling

    I can get it to work by using the following conditions:

    preceding-sibling::my:Table/my:field1 = ""

    AND

    preceding-sibling::my:Table/my:UniqueRowGuid = my:UniqueRowGuid

    But I'm not quite sure what you're trying to accomplish and therefore whether this is the correct way to go about it.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-14-2012 01:28 PM In reply to

    Re: Help with preceding-sibling

    Thanks for the reply Jimmy, I was able to get it to work using your expression as well but now I have another issue that I am trying to overcome.

    Here are the conditions for the rule I'm trying: preceding-sibling::my:Table/my:SaveForm = "true"
    AND
    preceding-sibling::my:Table/my:RowGuid = my:RowGuid

    The action of the rule is to set the "SaveForm" field to "true", and this rule is set on the "RowGuid" field.

    Basically there is a 1-Many relationship between infopath table rows and line items, and when the user enters in a value in one of the rows I need all other rows belonging to that line-item to have their "SaveForm" field set to true.

    Thanks for the help!
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.