Alphabetize browser based infopath form - InfoPath Dev
in

InfoPath Dev

Alphabetize browser based infopath form

Last post 10-02-2014 01:22 PM by sikni8. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 10-02-2014 01:22 PM

    • sikni8
    • Not Ranked
    • Joined on 10-02-2014
    • Posts 1

    Alphabetize browser based infopath form

    I know there have been many post on how to do this but this was done by someone else and I am trying to alphabetize it. Here are sample code: public void CTRL10_5_Clicked(object sender, ClickedEventArgs e) { XPathNodeIterator players = DataSources["BookingTempEntity"].CreateNavigator().Select( "/dfs:myFields/dfs:dataFields/ns1:BookingTemp/@Entity", NamespaceManager); string group = "/my:myFields/my:EntityGroup"; string field = "/my:myFields/my:EntityGroup/my:Entity"; foreach (XPathNavigator player in players) { string number = player.Value; //player.SelectSingleNode("Entity", NamespaceManager).Value; AddItem(group, field, number); } } private void AddItem(string group, string field, string itemId) { XPathNavigator DOM = MainDataSource.CreateNavigator(); XPathNavigator group1 = DOM.SelectSingleNode(group, NamespaceManager); XPathNavigator field1 = DOM.SelectSingleNode(field, NamespaceManager); XPathNavigator newNode = field1.Clone(); newNode.SetValue(itemId); group1.AppendChild(newNode); } The connection file is: BookingTempEntity Format: UDC V2; Connection Type: Database; connection string goes here select Distinct "Entity" from "dbo"."BookingTemp" as "BookingTemp" Specify a filename or formula
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.