Repeating sections into a repeating section or table in another view - InfoPath Dev
in

InfoPath Dev

Repeating sections into a repeating section or table in another view

Last post 11-14-2008 08:30 PM by steini. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 10-27-2008 11:26 PM

    Repeating sections into a repeating section or table in another view

    Hi

    I am rather new at Infopath and what I am trying to do is to take a few different repeating sections from one view and put them togeather in a repeating section in another view.

    I get an error saying that this control cannot repeat here

     Any known workarounds?

    thanks

    Steini

  • 10-27-2008 11:41 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Is there a particular reason why you are putting the repeating sections inside another repeating section in the other view, instead of just putting them into the additional view?  It sounds like that's what's causing the problem. 

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-27-2008 11:52 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Hi Jimmy

    thanks for a swift reply

     The reason is that the first wiew is a list of maitenance jobs ( repating sections ) done on one shift where each maitenance personal involved puts his name( repeating table insied the repeating section ).

    The second view is a time report for each maitenance personal where I sort the repeating section according to the person's name and display what information needed for the time report.

    I would like to do this in an repeating section so that each personel can make a time report on that page and then the supervisor just has to press print to get the whole bunch

  • 10-28-2008 12:07 AM In reply to

    Re: Repeating sections into a repeating section or table in another view

    So let me see if I understand this right.  You want the second view to just show a list of all the employees, next to the total number of hours each employee has from the other view?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-28-2008 12:17 AM In reply to

    Re: Repeating sections into a repeating section or table in another view

    No not quite

     I need the hours separated to each equipment the maitenance personal worked on

    hense the hassle.

    So in the first repeating section there is information abut Work order numbers and equipment worked on

    this info needs to get to the time report along with the hours that belong to that WO and equipment but skipping all kinds of other data in the repeating section ( that was done with filters and editing )

    also we usually have more than one personel working on each equipment so I need to sort them according the persons name and then get a new section/table with the next persons WO/equipment and hrs listed

     

    I have this all working really nicely exept for that repeating part

  • 10-28-2008 07:12 AM In reply to

    Re: Repeating sections into a repeating section or table in another view

    I understand now.

    It would be easy enough to display a table of employee names matched up with the jobs they did and the hours for each job, but the employees would appear in the same order they appeared in the other table, spread apart and without any sorting.

    Sorting of repeating tables isn't a built-in function of InfoPath, and what you describe certainly isn't. I'm afraid that if you want to implement this you'll need to use code to rearrange the data into groups more conducive to the display you describe.  I can give you a push in the right direction if you'd like to go that route

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-28-2008 01:49 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Thanks Jimmy

     The way it is set up now is that each employee picks his name from a drop down list box and then the equipment he worked on and the WO numbers for each task are displayed taking the repeating sections from the other view and sortin out only those that have his name attached to them. and then he enters the time for each job.

    If I get this function to repeat in an repeating table or section so each employee could have it's own report in the same view then I would have everything I wanted from this gadget.

     do you see a way to do that?

    I am not an experienced programmer but have fiddled around with some JS an html so if you make it simple enought I just might get it :-)

     

     

  • 10-28-2008 07:12 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    The InfoPath 2003 out-of-box sample Asset Tracker has a JS example of how to sort. Might be helpful and should be easily downloadable from the Microsoft solution site.

    Patrick Halstead
    Project Manager at Qdabra
  • 10-28-2008 10:29 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    What are you using to populate those dropdown boxes?   If it's a secondary data source or a group outside of your repeating groups, you might be able to pull this off without any code.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-28-2008 11:25 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Great news

    I am using a secondary datasource to populate the drop down box with employee names

    How can I do this without code?

  • 10-29-2008 08:02 AM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Ok, so I'm guessing your secondary data source looks something like:

    Employees (repeating)
       Name

     And your main data source has a part like:

     Jobs (repeating)
        JobName
        Employees (repeating)
             EmployeeName
             Hours

    So the first thing you do is drag the Employees node from your secondary data source onto the view and represent it as a repeating section.  A text box for the employee name will automatically be inserted and you can format it how you like.

    Now go to the Controls section of the Design tasks task pane and drag a repeating table into the repeating section you just created.  A dialog will pop up.  Bind the table to the Employees node (not the Jobs node) of your main data source, and click Next.  Add the hours node (and whatever else you want) to the list of columns and click Finish.

    Go into the settings for the repeating table you just created, go to the Display tab, and set a filter to show rows when EmployeeName (in the main data source) equals Name in the secondary data source.

    Close all open dialogs, click on the repeating table, go to Layout in the design tasks and click Add Table Column.

    Delete the text box that's automatically created, go to the Data source, use the right mouse button, drag the JobName node into the empty space, and represent it as an expression box.

     If I understood your specification correctly, this should be about all you need to do.  In the additional view, the employees will appear in the order they appear in the secondary data source, so if you would like them to be sorted, I'd recommend sorting the names in that secondary data source.

    Please give the above a try and let me know how it works out.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-05-2008 06:47 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Sorry about the late reply

     have been busy with other tasks but will let you know as soon as I try this out

  • 11-05-2008 07:18 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Actually my secondary data source is an xml spreadhseet, and it's simply a list of names.

    the other part is mostly correct although I have a bit more data in the Jobs section and the hours are only entered in the time report view.

    The employee name is an dropdown list box in an repeating table, inside the jobs repeating section, and the listbox is getting data from the secondary data source.

  • 11-06-2008 03:55 AM In reply to

    Re: Repeating sections into a repeating section or table in another view

    The schema I described for the secondary data source is just a list of names.  If yours is different, please describe how it is different (please be more specific) and explain why the steps I listed don't work in your case.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-06-2008 05:05 PM In reply to

    Re: Repeating sections into a repeating section or table in another view

    Ok this does not quite work for me

    The setup is as you described in the secondary data source

    The main data source: ( what I need from it )

    Job ( repeating )

    Machine asset number

    Work Order number

    Mechanic/Electrician: ( repeating table )

    Mechanis/Electricians on this job

     There are about 40 craftsmen working on the site on shifts and dayshifts so for each shift there is a report saved from this form and each employee needs to print out a time sheet with the wo: and asset number and his hrs on that job.

    I would like the view for the time report to show only data for craftsmen working on that shift ( that show up in the main data source ) and each to have his own section/table that shows his name and then lists the jobs he is registered for on that shift ( WO number and Asset number )

     A text field after each job in the list that the employee can enter the hrs for the work and then the total hrs calculated togeather at the bottom.

     Do you think this is possible?

    Thanks Steini

     

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