Data connections and reapeating tables - InfoPath Dev
in

InfoPath Dev

Data connections and reapeating tables

Last post 02-24-2010 02:41 PM by myrockmyshelter. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 02-16-2010 04:00 PM

    Data connections and reapeating tables

     Rather new to this forum, so I am going to hopefully explain this well. I have looked through many of the posts, but none seem to answer the exact question I have.

     So here goes..

     I have a form that has a dropdown list (users can select "ABC" or "XYZ"). After they select from the drop down list, I want the form to get the information (query) the exact table I have in my Access Database (so after selecting "ABC", the form would go to my database and find "tblABC") and drop whatever is in that db table into a repeating table in the Infopath form.

     So i got it to query the db and get the first result from the first line of the db...but the repeating table does not show the rest of the results from the query.

    is this because:

    1. in my repeating table i have plain text fields for the results?? do I need to change these to something else?

    2. or is it something I need to filter in the repeating table?

    3. or is it something I need to change in the dropdown menu? (when the user selects "ABC" then that dropdown menu performs an action to fill in the repeating table)?

     Thanks for any help, and I rarely asks any question just because I seem to find all my answers on this great forum! Thanks all.

    E Cooley
  • 02-17-2010 05:19 AM In reply to

    Re: Data connections and reapeating tables

    just one question how do you fill in repeating table, can u share that code/rule so that we can look at it and let you know

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-17-2010 07:18 AM In reply to

    Re: Data connections and reapeating tables

     Thanks Qazi for the response.

     I guess I can't answer, because that is kind of the question..." how do I fill in the repeating table" after a user has selected a choice from a dropdown menu. A user will select a choice from the dropdown menu, and depending on that choice, I need the repeating tables in the infopath form to be filled in with what it queries from certain tables in the access database.

     As far as code or the rule, I am also stuck. Right now I have a repeating table and it has text boxes in it. I set a rule in the dropdown/user choice menu that when the rule is met (lets say "XYZ" is chosen), then the fields value is set. This is where i run into problems because it only sets the fields value based on the FIRST row in the access database....where as I need it to fill in all the rows from query of the access database.

     I dont have VSTA.

     

    Thanks again for any response. Hopefully I am saying this all right!

    E Cooley
  • 02-17-2010 07:49 AM In reply to

    Re: Data connections and reapeating tables

     I have attached a screenshot of the the infopath form I am working on.

     

    As you can see, at the top is the dropdown menu (Program Name). I want users to choose one of the names, then after they choose that, I want the three (3) repeating tables below (they are under where it says "Materials" "Testing" "Publications") I want these three tables to get the information from certain tables from the access database.

     

    So for instance, the drop down has two choices: LAP and LDP. In the access database there are six tables related to these two choices (tblLAPmaterials, tblLAPtesting, tblLAPpublications, and the same 3 for LDP). And so when the user chooses the one they want from the dropdown, those repeating tables in the infopath form would be filled in with the appropriate items.


    E Cooley
  • 02-17-2010 10:20 PM In reply to

    Re: Data connections and reapeating tables

    can you attach the template so that we have a look at it

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-18-2010 09:54 AM In reply to

    Re: Data connections and reapeating tables

     I have attached the template form.

     Again, the dropdown menu an the top (select program), when a user selects one of the dropdown items, I have a rule that runs that queries the database (access). And whatever the user selects from the dropdown list, then the query is done and i want each of the repeating tables (each is linked to a different table in the db). There is a text box on the form named "Program Name" and I want the data filtered by that box. The problem I am having is how to filter it, and where?? I have tried using Conditional formatting, but I cant get it to filter right. Maybe I am just not getting it or am thinking of the design wrong??

     

    Thanks again for the response and any help provided. This forum is great, and I hope with the more knowledge I can, I can eventually help on this board.

    E Cooley
  • 02-19-2010 05:06 AM In reply to

    check if this helps

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-22-2010 10:22 AM In reply to

    Re: Data connections and reapeating tables

     Thanks! That was exactly what I needed, and I feel kind of silly for not knowing how to do that.

    But, one more question with this...How do I filter the total amounts in the box marked "Total"? I can get it to add (sum) up all data from the database, but I need it to add (sum) up only what program was selected (from field 57 and program name). So, a user selects program name (lets say "LDP") then does the prefill (lets say 12). The 12 is filled in for the prefill amounts, which multiplies it by the unit cost and we only see the LDP stuff. But how to total the LDP items only??? (i think it is in the filter of the Total text box, but am not sure how to get it done).

     

    Thanks again for the help. I have uploaded the current version of the form.

     

    BTW: i think this link tells me how to do it, but I still can not figure it out: http://www.infopathdev.com/forums/p/10461/37486.aspx

     

    E Cooley
  • 02-22-2010 11:09 PM In reply to

    for sum

    sum(@TotalCost[@ProgramName = ProgramName])

     i have done for the first total, write accordingly for others

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-23-2010 10:05 AM In reply to

    Re: Data connections and reapeating tables

     Thanks again for the help.

     I get the NaN error on the calculation in the Total box.. I have tried different things but nothing seems to help. Does this have to do with my fields from the Access database itself??  I have looked at a few other posts, but nothing seems to help, even though the issues seem to be the same. Here are the posts I found in ref to the NaN issue:

    http://www.infopathdev.com/forums/p/8379/30251.aspx#30251

    http://blogs.msdn.com/infopath/archive/2008/04/17/invalid-data-error-when-calculating-the-result-of-2-or-more-fields.aspx

     


     

     

    E Cooley
    Filed under:
  • 02-24-2010 02:41 PM In reply to

    Re: Data connections and reapeating tables

     Ok, I solved all the issues with this: sum(@TotalCost[field57 = @ProgramName])

     

    Thanks again for all the great help and leading me in the right direction. This board is invaluable and I really appreciate it. Hope I can give back someday! :)

    E Cooley
    Filed under:
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.