Automatically populating fields from a drop down menu in a repeating table - InfoPath Dev
in

InfoPath Dev

Automatically populating fields from a drop down menu in a repeating table

Last post 02-19-2009 09:16 AM by DerekB. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-21-2009 12:22 PM

    Automatically populating fields from a drop down menu in a repeating table

    Hello,

    I've looked around and I can't find something similar, so I figure I'd just come out and ask.  Here is what I'm trying to do:

    I'm creating a form so that users can request new active directory accounts.  As part of this form, they will need to select specific applications to be part of the profile.  I currently have the application listing in an Access database, but I think when everything is done it will be SQL.  In this database, I have 3 columns, one for the Application Name, one for the Licence Type and one for the Application Group.  Of course as the user will most likely have multiple applications, I'll need this in a repeating table.

     What I'd like to do is to have the user pick the application from a drop-down menu, and have it automatically populate the Licence Type and Application group fields.  I have been able to get this to work in the first row of the repeating table, but not rows beyond this, as it will continue to populate the information from the first row in the table.

     An Alternative would be to have the user copy the application name into a text box (we are planning to use the task pane to provide the listing of available applications), and have it populate the other two fields.

     

  • 01-21-2009 09:28 PM In reply to

    Re: Automatically populating fields from a drop down menu in a repeating table

    Hi,

    I think the filtering is incorrect. Once go through the below links.

    http://www.infopathdev.com/blogs/matt/archive/2006/04/18/Automatically-Populate-Fields-from-a-Drop_2D00_Down-Selection.aspx

    http://www.infopathdev.com/forums/p/8421/37095.aspx#37095

    Swathip
    www.ggktech.com
  • 02-10-2009 12:40 PM In reply to

    Re: Automatically populating fields from a drop down menu in a repeating table

    Hello,

    Thanks for the reply, but I still cannot seem to get it working.  I'll try to explain the fields and the filter, maybe that will help with the troubleshooting?

     In my MS Access Data source, I have 3 fields that I'm interested in:

    1)  The primary key (a simple number to identify each unique entry in the database)

    2)  Application Name

    3) Licence Type

     

    Within Infopath, I have created 2 drop down menus, Application_Name and License_type to match the Access Database.  I want to get the Licence_type automatically when selecting the Application_Name.  Please note that this is a repeating table as well.  Currently I have the application drop-down correctly populated from the data source.

    In the rules for the Application_Name drop down menu:

    Action:  Set a Field's Value

    Field:  Licence_Type

    Value:

    • Click Formula
    • Insert Field or Group
    • Select from my Infopath data source Package_Type
    • Filter Data
    • ID (The primary key from the Access database) is equal to Application_Name (from the infopath data source)
    • The final formula looks like this:  .@Package_Type[@ID = Applications]

    When I preview the form, it almost works...by that I mean it sometimes does and some times does not.  Specifically, the first entry in the drop down menu works all the time.  From that point on, it gets flakey.  Sometimes it selects the correct license type (there are only 3 different values) and sometimes it does not.  There does not seem to be a pattern..sometimes the second pick fails and the third works, sometimes the second pick works, the third fails ect....

     Is there anything that can be done to fix this?

  • 02-19-2009 09:16 AM In reply to

    Re: Automatically populating fields from a drop down menu in a repeating table

    I had some more time to work on this issue this morning.  I changed the field that the second drop down menu should return to the primary key from the Access database that I'm querying.  I found the result very interesting:

     When I pick an application that has a high primary key, it returns the correct value.  On the next instance of the repeating table, if I select an application with a lower primary key, it works fine...if I pick one with a higher primary key, it returns the previous value....

     

    For example:

    Primary key - Application

    1 - Adobe reader

    2 - Adobe Writer

    3 - Microsoft Visio

    If I pick Visio first, it returns the correct number of 3.  Then I add another row to the repeating table, pick Adobe Writer, it returns the correct number of 2. 

    If I pick Adobe Writer first, it returns the correct number of 2.  Then I add the next row to the table, pick visio, it returns 2 again.

     

    I can't help but to think this is very odd...does anybody know why this is occuring?

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