First Initial Last Name - InfoPath Dev
in

InfoPath Dev

First Initial Last Name

Last post 04-23-2014 11:07 AM by tjb105. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-23-2012 04:12 PM

    • bfry24
    • Not Ranked
    • Joined on 01-24-2012
    • Posts 3

    First Initial Last Name

    I am very new to using InfoPath and using formulas.  Is there any tutorials on formulas in InfoPath?

    I want to create a formula that will take the first letter in the firstName field and merge it with the entire lastName field, all in lower case.

    Can anyone help with this?

  • 01-23-2012 07:17 PM In reply to

    Re: First Initial Last Name

    Hi and welcome to InfoPathDev forums!

    You'll need to use substring to get the first letter in the FirstName and then combine the result to the value of your LastName using concat, something like: concat(substring(FirstName, 1, 1), LastName)

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 01-23-2012 09:28 PM In reply to

    • bfry24
    • Not Ranked
    • Joined on 01-24-2012
    • Posts 3

    Re: First Initial Last Name

     Jo Ann, thank you very much for the assistance as that did work.

    The only question is how can I get the result all in lower case.

     

    This is what I tried but does not work:  

    concat(translate(substring(firstName, 1, 1 ),  “abcdefghijklmnopqrstuvwyxz” ,“ABCDEFGHIJKLMNOPQRSTUVWYXZ”)), translate(substring(lastName, “abcdefghijklmnopqrstuvwyxz” ,“ABCDEFGHIJKLMNOPQRSTUVWYXZ”, ))

  • 01-23-2012 11:32 PM In reply to

    Re: First Initial Last Name

    Try this: translate(concat(substring(FirstName, 1, 1), LastName), "ABCDEFGHIJKLMONPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz").

    Hope that works! =)

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 01-24-2012 05:39 AM In reply to

    • bfry24
    • Not Ranked
    • Joined on 01-24-2012
    • Posts 3

    Re: First Initial Last Name

     Thanks again Jo Ann, that was the solution I was looking for.

  • 01-24-2012 10:21 PM In reply to

    Re: First Initial Last Name

    You're welcome, glad it worked!

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 04-23-2014 11:07 AM In reply to

    • tjb105
    • Not Ranked
    • Joined on 03-31-2014
    • Posts 4

    Combining Concat and Substring

    I'm trying to do something similar.  I would like to get the result of First Initial of Last name combined with a seperate field of last 4.  This is the fomula I am using:  concat(substring(@PATIENT_LAST_NAME), 1, 1) @Last_4_of_Patient_SSN

     This is the error I receive:

    Expected value type: end-of-string

    Actual value: ..
    concat(substring(../@PATIENT_LAST_NAME), 1, 1) -->..<--/@Last_4_of_Patient_SSN

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