Auto fill working intermittently - InfoPath Dev
in

InfoPath Dev

Auto fill working intermittently

Last post 03-25-2011 08:55 AM by dms.WebDev. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-27-2011 09:05 AM

    Auto fill working intermittently

    I'm creating an InfoPath 2007 form which I will publish to MOSS 2007 form library.  I have two drop down lists that connect to SQL database. The first drop down list auto fills several other text fields.  (e.g. Employee Name is driving field/drop down, and it auto-fills employee title, employee department, employee's supervisor, supervisor's title and so on). This works great.  I have a second drop down list that uses the same data connection and displays the same list of Employee names and auto-fills just one text field with employee title only.

    To reiterate: I have two drop down lists that read from same data connection and display the same list of information: Employee Name.  One auto-fills several other text fields.  The other auto fills only one text field.

    The problem:  The second drop down (employee name) list does not auto fill it's corresponding text field (title) when an employee name is selected IF the first drop down list is selected first.  It works correctly if the second drop list selection is made before the first drop list selection.However this is not the way the form is set up and it wouldn't make sense to rearrange the order of the drop down lists.

     Do I need to make a new data connection to make this work?

  • 01-28-2011 04:22 AM In reply to

    Re: Auto fill working intermittently

    If you're pulling the data from the same source and setting the query parameter (EmployeeName) before calling the data connection, then what you are describing should work. So, to be clear, the rules should be:

    1. When Dropdown1 is not blank, use the Employee Name selected in dropdown1 to query the data connection, and return the numerous fields, and set their values in the main DOM.

    2. When Dropdown2 is not blank, use the Employee Name selected in dropdown2 to query the data connection, and return one field, and set its value in the main DOM.

    However, adding a second data connection, even as a troubleshooting step to figure out what's wrong, shouldn't hurt.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 01-28-2011 04:12 PM In reply to

    Re: Auto fill working intermittently

    Are you suggesting I set a new Rule for the drop down list?  I tried but when I Set Condition and choose "is not blank", the 3rd field in Condition dialog (of Rule) goes gray (I can't select anything).

     

     

  • 01-28-2011 05:02 PM In reply to

    Re: Auto fill working intermittently

    We'd expect the third field to be disabled with the comparision of is not blank -- the comparative is already defined. We select a value in the third drop down when we use something like "equals".

    Field1 = Field2, for example.

    But Field1 is blank (is not blank, is present, is not present) is a complete condition.

    I think Ernesto's proposal assumes your two drop downs are bound to different fields, each which would have its own ruleset -- I may be misunderstanding.

    Hilary Stoupa

  • 03-25-2011 08:55 AM In reply to

    Re: Auto fill working intermittently

    It's been a while since I've been able to revisit this problem.  Hilary, thank you for pointing out the "is not blank" issue.  It should have dawned on me....but it didn't, and I appreciate you spelling it out!

    I tried Ernesto's suggestion (thank you Ernesto) and it worked. I created an "is not blank" rule before loading data connection and now it doesn't matter which order the 2 drop down lists are selected.  In the data connection wizard, on the Enter a name for this data connection screen, I had previously checked the box "Automatically retrieve data when form is opened" so that may have been causing the issue.  I left it checked and with new rules, it seems to be working but theoretically I could probably uncheck that box now that I'm loading data connection when the field is blank.

     I wonder if I should uncheck it?  Would it make the form load more effeciently?

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