Command Button on expense report template - InfoPath Dev
in

InfoPath Dev

Command Button on expense report template

Last post 07-28-2010 11:44 PM by expense report. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-27-2010 01:11 AM

    • B-Rad
    • Not Ranked
    • Joined on 05-27-2010
    • Posts 3

    Command Button on expense report template

     The expense report template for Infopath that can be downloaded from Microsoft has a command button at the end of each line item. Upon clicking this button it displays an optional section for the line item based on the category chosen.

     There is a rule on the button that i cant work out what it does

    Action - Set a fields value

    Field - itemPosition

    Value: count(preceding-sibling::*)

    The part that i haven't encountered before is the preceding and sibling functions mentioned in the value section.

     What does this mean and how does it enable the optional section on the form when the button is clicked? There isn't any code anywhere that i can find

    Filed under:
  • 05-27-2010 06:57 AM In reply to

    Re: Command Button on expense report template

    the Itemized Expenses is a repeating table

    and the Item Details is a repeating section.

    item details has a conditional formatting that forces it to show only the section number that equals the number in the itemposition.

    when you click the button, it sets the value of itemposition to the previous row # of the repeating table you are in

    function count(preceding-sibling::*) gives the previous row/section #

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 07-28-2010 11:44 PM In reply to

    Re: Command Button on expense report template

    Great information. It's very interesting a lot.

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