Set a drop down field's value based on another field - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Set a drop down field's value based on another field

Last post 01-06-2020 02:14 PM by Hilary Stoupa. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-06-2020 08:55 AM

    Set a drop down field's value based on another field

    Hello, I am trying to set a field's value in a dropdown list based on the type of request. If the request is a Commercial type, I want the Deployment Planner to automatically be Commercial Planner. I set rule that if Type of Request = Commercial, then Dep Planner = "Commercial Planner" Nothing appears when I click on Preview and test it though. I have attached the .xsn file. Can this type of rule not work with drop down lists? Please let me know what I am doing wrong. Thanks
  • 01-06-2020 10:39 AM In reply to

    Re: Set a drop down field's value based on another field

    You have different display and value options for your dropdown. Your rule instead needs to set to the value when Commercial Planner is selected - COMMInventory@xxxxxx.com (removed domain so no-one gets spammed).
    Hilary Stoupa

  • 01-06-2020 10:40 AM In reply to

    Re: Set a drop down field's value based on another field

    Oh, I should add - you'll also likely need a rule on the repeating table so that this gets set when a user inserts additional rules after making their commercial / residential selection. And the rule on the deployment planner field itself needs to be tested carefully - you want to make sure that when you re-set the value of a field with a rule on the field itself you don't accidentally cause a loop. :)
    Hilary Stoupa

  • 01-06-2020 01:24 PM In reply to

    Re: Set a drop down field's value based on another field

    Ah, now I feel like a right dim wit. I added the rule to both the DiscType field and the DepPlanner field. If DiscType=Commercial, then set field value DepPlanner=COMMInventory@xxx.com That works! Now, when I add another row to the table, the rule is not working or looping...it defaults back to select one... Is there a rule that will make it repeat throughout the table?
  • 01-06-2020 02:03 PM In reply to

    Re: Set a drop down field's value based on another field

    I think you should just add the same rule to the repeating group. Select the repeating table in the form and in the rules pane, you can add a rule that will fire when a new row is added. That rule will affect any new row, and only that row. Give it a try, and attach your latest template if you need a hand, ok?
    Hilary Stoupa

  • 01-06-2020 02:09 PM In reply to

    Re: Set a drop down field's value based on another field

    Hilary, you truly are the miracle worker. I added the rule to the table and it is working like a charm. THANKS SO VERY MUCH!!!
  • 01-06-2020 02:14 PM In reply to

    Re: Set a drop down field's value based on another field

    Wonderful, glad you have it working. I used InfoPath for ages before I realized I could add a rule to a repeating node. :)
    Hilary Stoupa

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