Preceding-sibling usage - InfoPath Dev
in

InfoPath Dev

Preceding-sibling usage

Last post 10-09-2009 08:44 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-09-2009 01:59 AM

    • kiranps
    • Not Ranked
    • Joined on 08-08-2009
    • Bangalore, India
    • Posts 16

    Preceding-sibling usage

    Hi,

    I have created a infopath 2003 form based out off a MS access database. The form works fine.

    I was trying to setup the rules for one of the fields. This is how i am doing it. My table name is Review and the field is Reviewer.

    I went to Tools -> Default values -> Added one more data fieldd group and then went to the Reviewer field on the newly added (second available) group. Then default value for that field.

    Now i want to inherit the value of the first Reviewer value to the second group Reviewer field and the subsequent items that may be inserted during runtime.

    Could you please give me the exact syntax of the preceding-sibling for this scenario. I tried several combinations of this. But that wouldn't work:

     

    For example, i used preceding-sibling::Review[last()'/Reviewer

    or preceding-sibling::Review[1]/Reviewer

    or  preceding-sibling::Review[1]

    Please let me know how can i use the preceding-sibling structure

     

    Thanks,

    Kiran

    Thanks,
    Kiran
  • 10-09-2009 02:16 AM In reply to

    Re: Preceding-sibling usage

     Could you attach a screenshot of your data source and explain a little more clearly what you want to do?

    Do you want the Reviewer field to always default to the value of the Reviewer field in the first row, or the value in the previous row?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-09-2009 03:38 AM In reply to

    • kiranps
    • Not Ranked
    • Joined on 08-08-2009
    • Bangalore, India
    • Posts 16

    Re: Preceding-sibling usage

    Unfortunately i cannot attach the screenshot now.

     

    To your question - 'Do you want the Reviewer field to always default to the value of the Reviewer field in the first row, or the value in the previous row?'

     Yes, that's exactly what i am trying to do - The Reviewer field should always default to the value of the Reviewer field in the first row when i insert new items (repeating sections) on the form.


     

    Thanks,
    Kiran
  • 10-09-2009 08:44 AM In reply to

    Re: Preceding-sibling usage

     In that case, using ../../Review[1]/Reviewer should probably do the trick, but you may be missing a prefix on Review or Reviewer, or both (like z:Review, or dfs:Review, etc).

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.