preceding-sibling error "...does not point to a valid location path of a field or group."

Locked preceding-sibling error "...does not point to a valid location path of a field or group."

Locked

  • Monday, July 02, 2007 2:33 PM
     
      Has Code
    I'm having a problem using the preceding-sibling in a conditional formatting condition.I have a secondary datasource that is a repeating table, and want to supress a column when it has the same value as the previous row's column, but the IP doesn't like my syntax.

    The repeating table column's xpath is:
    /dfs:myFields/dfsBig SmileataFields/tns:Get_ContactFlagsResponse/tns:Get_ContactFlagsResult/NewDataSet/ContactCategory/lu_Group

    My attempts at the preceding syntax have been based on  this syntax:
    preceding-sibling::NodeName[1]/elementname

    or
    current()/preceding-sibling::NodeName[1]/elementname

    both raise the same error in the conditional formatting designer.
    "preceding-sibling::ContactCategory/lu_Group" does not point to a valid location path of a field or group.


    A good article from Greg Collins http://www.infopathdev.com/blogs/greg/archive/2005/06/13/Using-XPath_2700_s-_2700_preceding_2D00_sibling_2700_-Axis-Correctly.aspx

All Replies

  • Monday, July 02, 2007 3:20 PM
     
     Answered
    This works:  preceding-sibling::*[1]/lu_Group
  • Friday, July 22, 2011 9:01 PM
     
     
    This helped me immensely. I knew it wasn't just copying the Xpath of the field, from examples I found.