How to get and set the value and display of dropdownlist? - InfoPath Dev
in

InfoPath Dev

How to get and set the value and display of dropdownlist?

Last post 12-03-2012 12:17 AM by jaypeebacol. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-19-2012 04:01 AM

    How to get and set the value and display of dropdownlist?

    Hi,

    I have 3 dropdownlist, each dropdownlist has display value of "YES" and "NO". If I select YES in any of this, the 2 dropdownlist should be set to "NO". Below is sample:

    Scenario 1:

    dropdownlist1 = YES

    dropdownlist2 = NO

    dropdownlist3 = NO

    Scenario 2:

    dropdownlist1 = NO

    dropdownlist2 = NO

    dropdownlist3 = YES

    Scenario 3:

    dropdownlist1 = NO

    dropdownlist2 = YES

    dropdownlist3 = NO 

    Now, I want to handle this using code editor (C# language). So, In code, I need to know which event of dropdownlist that I need to use and get the current selected value of dropdownlist and set the other two dropdowlist to NO.

    Please help me.

  • 10-19-2012 09:44 AM In reply to

    Re: How to get and set the value and display of dropdownlist?

    You don't need custom code to accomplish this in InfoPath, just rules.  Create an action rule on dropdown1 that says if dropdown1 = YES then set a field's value dropdown2 = NO and set a field's value dropdown3 = NO.  Similarly you would create rules for dropdown2 and dropdown3 to set the other two values to NO.  Hope this helps!
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 12-03-2012 12:17 AM In reply to

    Re: How to get and set the value and display of dropdownlist?

    Thanks for your reply Anson. Btw, I have a new post. http://www.infopathdev.com/forums/p/24543/84869.aspx#84869

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