Comparing Xpath function to a text box field. - InfoPath Dev
in

InfoPath Dev

Comparing Xpath function to a text box field.

Last post 10-31-2011 04:10 PM by Hilary Stoupa. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-31-2011 12:24 PM

    • Doreen
    • Top 50 Contributor
      Female
    • Joined on 08-11-2010
    • Federal Way, WA
    • Posts 291

    Comparing Xpath function to a text box field.

    I have an expression box in a repeating table that uses one function; postion() to number the rows in the table. Each row in the table represents one day of travel. There can be 1 or more rows in the table. 

    The problem:  I need to determine which day is the first day of travel and which is the last day. Obviously the first day of travel is easy because that row always equals 1.  The last day of travel will equal the total number of travel days which is another textbox field that gets its value from the difference between 2 dates using Alec Pojidaev's method found here: http://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/ 

    Therefore I want to compare the row # displayed in my expression box (formated as text)  to the travelDays field (text/string data type). If they equal, I want to set a value to another field based on this rule.

    How do I write a rule to compare an expression box to a text box field? 

  • 10-31-2011 03:41 PM In reply to

    • Doreen
    • Top 50 Contributor
      Female
    • Joined on 08-11-2010
    • Federal Way, WA
    • Posts 291

    Re: Comparing Xpath function to a text box field.

    Sometimes when things don't work as you expect you have to rethink the problem.  In this case I decided to compare actual dates instead of date counts aginst repeating row counts.  It'll be more accurate this way and easier to write Rules for.

    Doreen

  • 10-31-2011 04:10 PM In reply to

    Re: Comparing Xpath function to a text box field.

    Glad you found a way to do what you need - and thanks for updating the thread!

    Hilary Stoupa

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