Dropdown2 persist its last selected value when Dropdown1 selection change - InfoPath Dev
in

InfoPath Dev

Dropdown2 persist its last selected value when Dropdown1 selection change

Last post 03-11-2011 01:01 AM by chintan.desai. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-10-2011 07:57 AM

    Dropdown2 persist its last selected value when Dropdown1 selection change

    Hi Folks, I got the way to filter Dropdown2 values based on their respective category in Dropdown1. However, Dropdown2 persist its last selected value. E.g. Dropdown1 value: Fruits Vegetable... Dropdown2 value: apple, orange, graps, Carrot, Spinach, Brinjal... So when user select Fruits from Dropdown1, dropdown2 will filter with apple,orange.... - user selected apple from dropdown2. when user select Vegetable from dropdown1, apple selection will remain persist along with Carrot, spinach... (please check attached screen shot). Note: All values are coming from Sharepoint list Please guide. Thanks, Chintan
    Thanks,
    Chintan
  • 03-10-2011 08:12 AM In reply to

    Re: Dropdown2 persist its last selected value when Dropdown1 selection change

    Add a rule to the field bound to drop down 1 to set drop down 2 to blank.

    Hilary Stoupa

  • 03-11-2011 12:28 AM In reply to

    Re: Dropdown2 persist its last selected value when Dropdown1 selection change

    Hi Hilary, I did it but no help. Please provide alternative. Thanks, Chintan
    Thanks,
    Chintan
  • 03-11-2011 01:01 AM In reply to

    Re: Dropdown2 persist its last selected value when Dropdown1 selection change

    SOLUTION :) We have to target XML content and then using xml method "postion() = 2" will set value in dropdown2 during change in dropdown1 selection. Create a rule in dropdown1 properties: In the Rule dialog box, click Add Action. In the Action dialog box, select Set a field's value from the Action drop-down list box. In the Action dialog box, click the button behind the Field text box. In the Select a Field or Group dialog box, click dropdown2, and then click OK. In the Action dialog box, click the button behind the Value text box. In the Insert Formula dialog box, click Insert Field or Group. In the Select a Field or Group dialog box, select items (Secondary) from the Data source drop-down list box - I created Data Connection which receive fruits and vegetables (apple,carrot etc) from xml document. Here items is the field name which populate dropdown2... In the Select a Field or Group dialog box, expand the item node, click the value node, and then click Filter Data. In the Filter Data dialog box, click Add. In the Specify Filter Conditions dialog box, select The expression from the first drop-down list box. In the Specify Filter Conditions dialog box, type the following expression in the text box: position() = 2 In the Specify Filter Conditions dialog box, click OK. In the Filter Data dialog box, click OK. In the Select a Field or Group dialog box, click OK. In the Insert Formula dialog box, click OK. In the Action dialog box, click OK. (Action dialog box value text box should look like: FruitsVegetable[position()=2. Here, FruitsVegetable is xml node which populate dropdown2) In the Rule dialog box, click OK. In the Rules for Opening Forms dialog box, click OK. In the Form Options dialog box, click OK. - Chintan
    Thanks,
    Chintan
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.