Concat String Name - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Concat String Name

Last post 12-01-2020 09:44 AM by Evanz. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-30-2020 05:28 PM

    • Evanz
    • Top 200 Contributor
    • Joined on 04-16-2020
    • Posts 56

    Concat String Name

    Hi,

    I got this concat string code to work like B 372630 with the name Brown, Michael (LN, FN). It only shows the initial last name "B" but I can't get how to write an additional code to get the initial first name as well. For example, it should be like MB 372630. Any thought? Thank you so much!

    concat(translate(substring(DisplayName, 1, 1), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), substring-after(substring-before(DisplayName, "."), substring(DisplayName, 1, 1)), " ", translate(substring(substring-after(substring-before(DisplayName, "@"), "."), 1, 1), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), substring-after(substring-after(substring-before(DisplayName, "@"), "."), substring(substring-after(substring-before(DisplayName, "@"), "."), 1, 1)), substring-before(substring-after(now(), ":"), ":"), substring-after(substring-after(now(), ":"), ":"), substring-after(substring-after(today(), "-"), "-"))

     

  • 12-01-2020 07:39 AM In reply to

     I don't know if you need the translate, but this will get you the two initials in first last order:

    concat(substring(substring-after(DisplayName, ", "), 1, 1), substring(DisplayName, 1, 1))

    I'd probably wrap the translate around the above, so that you only have to have it one time. Then use another concat around that to add the date info you wish to include. 

    Hilary Stoupa

  • 12-01-2020 07:41 AM In reply to

     Here's a sample with just the initials part. Right click the attached file and save it locally. Right click the saved file and select Design to open in design mode.

    Hilary Stoupa

  • 12-01-2020 09:44 AM In reply to

    • Evanz
    • Top 200 Contributor
    • Joined on 04-16-2020
    • Posts 56

     Awesome. Thank you very much for your quick turnaround! You're the best. :-)

    Have a great day!

    Best Regards,  

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