Infopath Equivalent of left() - InfoPath Dev
in

InfoPath Dev

Infopath Equivalent of left()

Last post 03-11-2010 07:51 AM by mjphelan. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-11-2010 03:19 AM

    Infopath Equivalent of left()

    I've spent a few hours searching the forums, and I have a feeling that while it seems very simple it's goign to be  otherwise..

    I'm looking for a simple Infopath equivalent of the VBA LEFT() function.

    Simply put, I need to concatenate the fist character of one field and a second field in an automated manner.

    In VBA the code would be

    strvalue = left(firstfield,1) & secondfield

    If at all possible I'd like to keep this as a "rule" or "Default Value" within the form if at all possible, to make it as easy as possible for others to update/change the form if need be,

    Many Thanks

    Mark P

  • 03-11-2010 06:22 AM In reply to

    Re: Infopath Equivalent of left()

    The XPath equivalent of left(field, x) is substring(field, 1, x), and the XPath equivalent of a & b [ & c ...] is concat(a, b [, c...]), so the formula you're going for is something like:

    concat(substring(firstfield, 1, 1), secondfield)

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-11-2010 07:51 AM In reply to

    Re: Infopath Equivalent of left()

     A perfect solution to an annoying little problem.. Many Thanks ;o)

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