Repeating Table HELP! - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Table HELP!

Last post 01-05-2017 03:38 PM by Hilary Stoupa. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-04-2017 05:16 PM

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

    Repeating Table HELP!

    Hello all, I'm hoping someone can provide me with a "ah ha" moment he as it has been some time since I have done anything in InfoPath. I have a standard SP List which I am using as a secondary data source. In that list I have added a blank text field that I want to populate in InfoPath. On form load I am querying the list filtering based on a field that has a project release date. On the form I have added the repeating table from the secondary data source. When the form loads the repeating table shows my four projects as it should however when I try to count each instance of the project names in the returned query it results in my blank field getting the same number which is the total number of all projects at the source. I would like it to be more like the below Project A 400 Project B 360 Project C 140 I basically want to count all instances of the returned table and display the count next to the respective project Any ideas?
  • 01-05-2017 07:57 AM In reply to

     I'm not sure I understand, but I'm attaching a sample that I think may relate to what you are trying to do? Save the attached file locally, right click, select design & preview to try it out. If I'm not understanding correctly, maybe you can attach your form in a reply under the options tab and I can take a look at it?

    Hilary Stoupa

  • 01-05-2017 08:32 AM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

    Hi Hilary,

     

    thank you for responding. I took a look at your file and actually saw this on another post. Unfortunately in my instance the user is not entering information. I'll try to explain better.

     

    - I have a list that holds a list of projects with other meta data like planned number of tests, actual number of tests, current status, trending status

     

    When the form opens, I am trying to display a table with the below for each project

     

    ex.

    Project Name

    Planned Total Number of Tests

    Actual Total Number of Tests

    Number of Completed Tests

    Number of Uncompleted Tests

    Present Status

    Trending Status

    Project A

    22

    68

    34

    [count total tests for project – number of completed tests)

    Green

    Yellow

    Project B

    46

    88

    57

     

    Red

    Green

    Project C

    78

    54

    76

     

    Yellow

    Red

     

     

    I know a query and potentially some formulas would need to be done because the list doesn't look like above.

      Some need to count each test item in the list associated with the Project. Others need to count the entire list for the given project where "Green" or some other color is present

     

    Then I need to build the table above with what is returned so  it shows the appropriate information for the give project. 

     

     does that make more sense?

     

    thanks again for your help!

  • 01-05-2017 08:37 AM In reply to

    Not to be slow - but the Planned Total Number is from the list, and is per project? So is the number of completed? Wouldn't you just put a calculated value in the column for Number Of Uncompleted that is the Total Number minus the Number Completed?
    Hilary Stoupa

  • 01-05-2017 08:42 AM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

     Hi Hilary,

    Yes i could do that for that column however that column doesn't actually live in the list yet. I was hoping to be able to do that calculation in infopath verses doing it in SP 

  • 01-05-2017 08:47 AM In reply to

    Yes, I meant the calculation would be in InfoPath - just use a calculated value? So - you put the table from the secondary data source on the form, and in one column use a calculated value to show the result?
    Hilary Stoupa

  • 01-05-2017 08:56 AM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

    Hilary Stoupa:
    Not to be slow - but the Planned Total Number is from the list, and is per project? So is the number of completed? Wouldn't you just put a calculated value in the column for Number Of Uncompleted that is the Total Number minus the Number Completed?
     

     

    to clarify none of the columns with the exception of Project Name are in the actual list. There is a multitude of list items for each project and I need to count certain things to get the Totals.

     

    Planned Total = Count all tests where project name is = "a" etc (the associated project)

    Actual Total = Count all tests where project name is = "a" and test status column not equal to "N/A"

    Number of Completed = count all tests where project name is = "a" and completed column equal to "true"

     

  • 01-05-2017 08:59 AM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

     

    Hilary Stoupa:
    Yes, I meant the calculation would be in InfoPath - just use a calculated value? So - you put the table from the secondary data source on the form, and in one column use a calculated value to show the result?

     yes I could do this for that column. Would I have to recreate the calculated value multiple times for each project or is there a way to say  "give me the count for each project displayed in this list"

  • 01-05-2017 09:09 AM In reply to

    Oh, I see - so you do need to do something like what is in the sample I attached. You have a data connection to the Projects list? Drag the data fields onto the form, so you have a repeating table, then add a formatting rule to hide any rows if the preceding sibling has a matching name. Then you can use calculated values with formulas similar to the one in the sample I attached to sum data, etc. Attach your template to a reply if you need a hand & I can help you out later today or tomorrow.
    Hilary Stoupa

  • 01-05-2017 09:14 AM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

    Hilary Stoupa:
    Oh, I see - so you do need to do something like what is in the sample I attached. You have a data connection to the Projects list? Drag the data fields onto the form, so you have a repeating table, then add a formatting rule to hide any rows if the preceding sibling has a matching name. Then you can use calculated values with formulas similar to the one in the sample I attached to sum data, etc. Attach your template to a reply if you need a hand & I can help you out later today or tomorrow.
     

     

    Hi Hilary,

     

    oh that is awesome news. i will give it a try and if I get stuck i'll come back and attach. It shouldn't matter that the user is not entering the information in right? Because in mine I would just like to pull the info automatically

  • 01-05-2017 09:27 AM In reply to

     My sample has both tables bound to the main data source simply to make it easy for someone to preview, etc. The same techniques work regardless of the data source. I'm attaching another sample that uses a secondary (XML) data source - it originally was to demonstrate a different technique, but I made a minor modification to hopefully show this as well.

    Hilary Stoupa

  • 01-05-2017 11:26 AM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

     Hi Hillary,

     

    I am having trouble with the xpath creating a calulated value formula. do you know how I can basically recreate the below:

     count(Vertical_x002f_Charter[Title = current()/Title])

    I am attempting to count the list of project names(Vertical_x002f_Charter) in a 3rd data connection where the project name = current project name in secondary data connection (Title)

     

    xpaths: 

    Project Name in secondary data connection (this is the list I am using as repeating table)

    /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title

     

    Project Name in 3rd data connection

    /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Vertical_x002f_Charter

     

     

     UPDATE * I figured it out. May be back with more questions ;)

  • 01-05-2017 02:00 PM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

     Hi Hilary,

     

    I got the calculated value formulas working along with the preceding-sibling.

     

    An issue I have now is that it is giving me an error when trying to publish " Binding a non repeating control to a repeating field or group is not supported in InfoPath 2010 Web Browser Forms"

     

    do you know how to resolve? 

  • 01-05-2017 02:07 PM In reply to

    http://www.infopathdev.com/blogs/hilary/archive/2012/01/19/ipfs-design-checker-errors-amp-print-preview.aspx

    This is an error in IPFS - basically, sometimes InfoPath will add binding info to the view for a calculated value that causes an issue when publishing. You can manually remove this info from the view files. Attach your template under the Options tab in a reply if you need a hand. 

    Hilary Stoupa

  • 01-05-2017 02:17 PM In reply to

    • Akuma
    • Not Ranked
    • Joined on 01-04-2017
    • Posts 13

    Hi Hilary,

     

    please find it attached 

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