Info-Path - how to split a string into 2 substrings - InfoPath Dev
in

InfoPath Dev

Info-Path - how to split a string into 2 substrings

Last post 11-21-2014 01:49 AM by derekmac. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-20-2014 12:32 PM

    Info-Path - how to split a string into 2 substrings

    Hi i am using microsoft infopath to create forms for sharepoint and i was wondering how to auto populate fields with sub strings. Basically i have 3 fields; full name , first name and last name. the full name field is a drop down list containing full names. i want first name and last name to be populated based on the full name selected. so if for example say someone selects the full name "joe bloggs" from the drop down list, this selection will populate the first name field with "Joe" and the last name field with "bloggs" automatically. can i use a function in infopath to split the full name string into 2 sub strings (first name and last name). ?
  • 11-20-2014 04:16 PM In reply to

    Re: Info-Path - how to split a string into 2 substrings

     Hello derekmac,

    Yes, you can use the substring functions to split the first and last name from your dropdown entries.  I've attached an example for reference, but you'll want to run an action when a user selects an entry from the dropdown. The 2 formulas used are:

     substring-before(FullName, " ") and

     substring-after(FullName, " ")

    Hope this helps!
    Bre 


    Bre Huston | Project Manager

    Qdabra® Software / InfoPathDev.com / FormsQuo /  877.544.2389 main / 425.318.7843 direct

    Business Process Automation for Everyone – Streamline data gathering to turn process into knowledge.™


  • 11-21-2014 01:49 AM In reply to

    Re: Info-Path - how to split a string into 2 substrings

    Hi Bre, Thanks for your quick reply and help that worked perfectly, you have saved me a lot of time much apprenticed Derek
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.