Ho do I use the substring function - InfoPath Dev
in

InfoPath Dev

Ho do I use the substring function

Last post 05-30-2011 09:50 PM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-30-2011 07:39 PM

    Ho do I use the substring function

     Hi Everyone,

     I want to take data out of 2 text boxes, and insert parts of it into a 3rd data source.

    For example I want to take the first letter of the firstName data source, and take the entire contents of the lastName data source and put it into the thirds data source loginName.

    So data would be:

    First Name "joe", last name "Blogs"

    I want the form to then automatically fill out the loginName data source to make it "jblogs"

    I understand that I would need to use the substring, substring before/after functions, but I can't figure out how it is supposed to work.

    Can someone hhelp me please.

    Thanks in advance.

  • 05-30-2011 09:50 PM In reply to

    Re: Ho do I use the substring function

    http://www.w3.org/TR/xpath/#function-substring

    In this case, I think the formula you want is:

    concat(substring(firstName, 1, 1), ' ', lastName))

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.