Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:08:25+00:00 2026-06-08T06:08:25+00:00

I have a repeating table in Infopath. On a field change event, I need

  • 0

I have a repeating table in Infopath. On a field change event, I need to execute a calculation to with data in the row in question. How do I go about this in the code-behind (C#) and Xpath?

For example, I have a start date and end date. In the code-behind the do a calculation to calculate the number of hours in the span. This works for the first row, but not subsequent rows. I know the way I wrote it so far only works for the first row, but how do I make this work for all rows?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:08:27+00:00Added an answer on June 8, 2026 at 6:08 am

    You can use XPathNodeIterator for this. For example:
    You can use XPathNodeIterator for this. For example:

            XPathNodeIterator nodes = MainDataSource.CreateNavigator().Select("/my:myFields/my:group1/my:group2", this.NamespaceManager);
    
            string field1 = string.Empty;
            string field2 = string.Empty;
            string field3 = string.Empty;
    
            foreach (XPathNavigator node in nodes)
            {
                field1 = node.SelectSingleNode("my:field1", this.NamespaceManager).Value;
                field2 = node.SelectSingleNode("my:field2", this.NamespaceManager).Value;
                field3 = node.SelectSingleNode("my:field3", this.NamespaceManager).Value;
            }
    

    This will get the value of each field and set a string variable to that value. If you wish to concatenate all the values, you’ll need to modify this — you can do something very simple like:

    field1 = node.SelectSingleNode("my:field1", this.NamespaceManager).Value + " " + field1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program-generated HTML file, and this tag is repeating: <table cellspacing=0 cellpadding=0
I have a table which is update has some fields with repeating data. I
Hello I have repeating table on my infopath form. It is bound with xml
I have a repeating table row with a select list. I want to create
I have this table which contains a field called 'icon_for' which I have been
I have a table with data relating to several moments in time that I
I have a rather large table which I need to query for a reporting
i have a table like this NAME VALUE ----------------- bla 1 bla 2 bla
I have a table with about 20 columns. 10 of them generally tend to
I have a table Stores , and a table Schools . This is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.