How can I check if I am in the last node of a repeating table. - InfoPath Dev
in

InfoPath Dev

How can I check if I am in the last node of a repeating table.

Last post 02-28-2014 07:28 AM by Catharine. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-28-2014 02:59 AM

    How can I check if I am in the last node of a repeating table.

    Hi,

    I want to have a button in a row of a repeating table. 

    But I only want that button to be available in the last row of the repeating table.

    What condition should I use to hide the button (I can't get my head round, if I should be using last() or checking for existence of a following-sibling).

    My structure is

    Products 
          ProductItem (repeating)
                 RequestID

    Thank you.

    Catharine

  • 02-28-2014 04:30 AM In reply to

    Re: How can I check if I am in the last node of a repeating table.

    1. Add a field RowNum to your table
    2. Add a Row to accommodate your button. Put the button into a section.
    Add conditional formatting on the section to hide the button if the rowcount is not equal to the Row Number

    Example Attached.

  • 02-28-2014 06:41 AM In reply to

    Re: How can I check if I am in the last node of a repeating table.

     You should be able to do this by checking for the existence of a following sibling. last() would be unreliable here. Please try this:

    Condition: following-sibling::my:ProductItem

    Formatting: Hide button

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 02-28-2014 07:28 AM In reply to

    Re: How can I check if I am in the last node of a repeating table.

    Thank you very much.  Super clear and worked first time. 

    Much appreciated.

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