How to Fillter Data - InfoPath Dev
in

InfoPath Dev

How to Fillter Data

Last post 04-27-2009 05:35 AM by karthik. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-23-2009 11:44 PM

    • karthik
    • Not Ranked
      Male
    • Joined on 03-18-2009
    • India
    • Posts 23

    How to Fillter Data

    Hi,

     

     how to display the approved status records in my InfoPath form.

     

    For example..

    My list columns

     

    Leave type-PL/CL

    Leave status-Approved(or)Refused.

     

    Thanks

    karthik

     

     

  • 04-24-2009 05:06 AM In reply to

    Hi,

    Add the filter for Leave status field. For example,

    My:Fields/my:group1/my:group2[my:LeaveStatus = ‘Approved']

    If you still not get the result, send the schema of your secondary source.

    Swathip
    www.ggktech.com
  • 04-27-2009 12:18 AM In reply to

    • karthik
    • Not Ranked
      Male
    • Joined on 03-18-2009
    • India
    • Posts 23

    hi,

             Thank you for your response.i am using this type of code. how can i filter the records on form_load.and also how can i assign the records in repeated table.

    DataSource dsEmployee = this.DataSources["LeaveInfo"];

    XPathNavigator xnEmp = dsEmployee.CreateNavigator();

    XPathNodeIterator xiEmp = xnEmp.Select("/dfs:myFields/dfs:dataFields/dfs:LeaveInfo", this.NamespaceManager);if (xiEmp.Count > 0)

    {

    while (xiEmp.MoveNext())

    {

    if (xiEmp.Current.SelectSingleNode("@ApprovalStatus", this.NamespaceManager).Value == "Approved')

    {

    this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:group1/my:group2/my:field4", this.NamespaceManager).SetValue(xiEmp.Current.SelectSingleNode("@EmpName", this.NamespaceManager).Value);

     

    }

    }

     

    Thanks

    karthik

     

  • 04-27-2009 05:08 AM In reply to

    Hi,

    Replace the 3rd line code with the following code line to filter the records.

    XPathNodeIterator xiEmp = xnEmp.Select("/dfs:myFields/dfs:dataFields/dfs:LeaveInfo[@ApprovalStatus = ‘Approved']", this.NamespaceManager);

    Swathip
    www.ggktech.com
  • 04-27-2009 05:35 AM In reply to

    • karthik
    • Not Ranked
      Male
    • Joined on 03-18-2009
    • India
    • Posts 23

    O Great its working fine.Thank you for your response..

    Cheers

    karthik

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