Display calculated repeating section header - InfoPath Dev
in

InfoPath Dev

Display calculated repeating section header

Last post 10-19-2013 10:23 AM by kitmenke. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-12-2013 04:03 PM

    Display calculated repeating section header

    I'm trying to create a list of jobs per day in InfoPath 2013. Each day can have 1 to many jobs. To do this I've created a Repeating Section which contains a Repeating Table. Starting on Monday, they can add another DAY and then add one to many jobs.

    I want it to look like this:

    Monday
    - Job ABC
    - Job DEF

    Tuesday
    - Job XYZ

    Wednesday
    - Job XYZ
    - Job LMN

    Question:

    How can I get it to display "Monday", "Tuesday", "Wednesday", etc at the top of each section?

    (Attached is my progress so far)

    Filed under:
  • 10-15-2013 06:36 PM In reply to

    Re: Display calculated repeating section header

     Hi, see attached. Save the file locally, right click and select design. I added an expression box that returns the Text value from your secondary data source based on the ID in the drop down.

    Hilary Stoupa

  • 10-19-2013 10:23 AM In reply to

    Re: Display calculated repeating section header

     This is perfect thank you. Your XPATH gave me what I needed to remove my number textbox and the dropdown.

     Here is the final expression:

    xdXDocument:GetDOM("daysofweek")/Days/Day/@Text[../@ID = 1 + count(current()/preceding-sibling::my:repeatDayOfWeek)]

    In pseudo code:

    1. Get the current row number (ex: 1,2,3,4)... which is the count of my repeating section
      1 + count(current()/preceding-sibling::my:repeatDayOfWeek)
    2. In my data source, daysofweek, get the Text by ID
      xdXDocument:GetDOM("daysofweek")/Days/Day
    3. Where @ID = the current row number

     

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