Ignore case in text field comparison ? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Ignore case in text field comparison ?

Last post 06-15-2007 03:01 PM by Greg Collins. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-14-2007 08:35 AM

    Ignore case in text field comparison ?

    Hi,  I want to compare the values in 2 different fields in conditional formatting.  But they are both text fields and I want to ignore the case of the fields ie

    YES=yes=Yes......etc.  Is this possible or do I have to resort to code

    Thanks

  • 06-14-2007 10:12 AM In reply to

    Re: Ignore case in text field comparison ?

    If you are comparing in code, you should already know how to due this by converting both strings to lowercase.

    In rules, you can do the samething with the XPath translate() function:

    translate(my:field1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") = translate(my:field2, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")

  • 06-15-2007 06:24 AM In reply to

    Re: Ignore case in text field comparison ?

    Thank you - I had never used the translate function before
  • 06-15-2007 03:01 PM In reply to

    Re: Ignore case in text field comparison ?

    The safest way is to do it in code, as that can handle extended (foreign) characters. However, if you have those, you can also add them to the string in the translate() function.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.