Multiselect List box doesn't clear old values when data refreshed - InfoPath Dev
in

InfoPath Dev

Multiselect List box doesn't clear old values when data refreshed

Last post 10-19-2014 07:00 PM by jacqui1811. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-16-2014 11:49 PM

    Multiselect List box doesn't clear old values when data refreshed

     Hi,

    I have a Multiple-Selection List box that is populated by a datasource calling a web service to get the data.

    I have a function that changes that datasource and after I call it I call the datasource execute function again.

    This works on adding the items, the new item is added to the list box and available for selection once the datasource is called/refreshed again.

    However if I remove an item and then refresh the datasource it seems to keep the item in but showing it checked and as the value (id) not the text that is the display text.

    If I uncheck it, it removes it from the list box.

    Am I missing a step here ? I would be grateful for your advise.

    Many thanks.

    Jacqui

  • 10-19-2014 07:00 PM In reply to

    Re: Multiselect List box doesn't clear old values when data refreshed

     Hi,

    After trying many things I found that setting the group's inner xml to be an empty instance of the repeating field, as below, then executing the data connection that populates the dropdown worked .

     MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:GroupName", NamespaceManager).InnerXml = "<my:RepeatingField></my:RepeatingField>";

    If I just set it to "" then the xml was invalid when repopulating the drop down.

    Hope this helps somebody else and saves them a couple of hours work.

    Jacqui.

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