Populate Text Field based on dropdown selection value - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Populate Text Field based on dropdown selection value

Last post 04-12-2019 09:05 AM by Anubhav. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-11-2019 08:04 PM

    Populate Text Field based on dropdown selection value

    Hi Experts!! I have just started with InfoPath Development. So I was designing forms based on SQL DB as the backend. So there are just 2 fields in this form: 1 Drop down (which I want to autopopulate on loading of Form) & Text field ( which I want to fill based on the selection of dropdown value). 1) I have not designed this as Database Form as I was not able to populate the dropdown ( Basically i could not find the checkbox of "Autopopulate on load" in wizard) 2) Then I have designed this as a Blank form in which I was able to auto populate the drop down values. Now comes to filling of Text field, so I have adopted this approach: a) On this drop down created a Rule 1 to query the SQL Table. b) Then created Rule 2 - "Set the field value" in Field as "datafield" of Table (text field) and Value as same data field (of SECONDARY CONNECTION) with filter ( dropdown value as equal to dropdown-like field in "datafield"). Issue: Now my dropdown is filled only first time and is NULL on change of dropdown value. So I am not able to ppulate my Text field. Also i have a curiosity that why these Blank Forms does not have queryfields and only DataFields? Any help will be much appreciated.
    Cheers!!
    Anubhav
    Filed under:
  • 04-12-2019 07:46 AM In reply to

    Re: Populate Text Field based on dropdown selection value

    It would help me if I could see a copy of your form (the one where you started from a blank form) - you can attach it under Options in a reply. As to why your blank form doesn't have query fields in the main data source - those are only there with data bound forms. For a form where you start from blank, there is nothing in the main data source to query - the XML is all just data.
    Hilary Stoupa

  • 04-12-2019 08:05 AM In reply to

    Re: Populate Text Field based on dropdown selection value

    Hi Hilary, I stopped with my development of Blank and went ahead with Database Form. I was able to achieve my objectives by performing following actions. 1) Populate the drop down - added a rule on "On load event" and then in that rule i added a second action of setting the value from data field - SUCCESS!! 2) I was comparing with text and not value field so compared and got he result. SUCCESS. Thanks for the reply. Will post more questions as I proceed. Regards, Anubhav
    Cheers!!
    Anubhav
  • 04-12-2019 08:23 AM In reply to

    Re: Populate Text Field based on dropdown selection value

    Hey, great job figuring it out - the learning curve at the beginning can seem a bit steep. One thing that helped me a lot was just dragging my various data sources onto the form, making sure all the data was displayed in text controls so I could see the actual values of stuff - especially when working with secondary data sources. It is easy to delete stuff when you are done designing, and actually seeing the data helped me a lot - Oh, and I would add buttons to execute queries, and put the query fields on the form as well, so I could see what worked & what didn't.
    Hilary Stoupa

  • 04-12-2019 09:05 AM In reply to

    Re: Populate Text Field based on dropdown selection value

    Thanks Hilary. You know what I was looking for some kind of mechanism t print values and able to debug a sort of. This will really help me with it. Anubhav
    Cheers!!
    Anubhav
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.