how to take textbox info pull it apart and populate other text boxes? - InfoPath Dev
in

InfoPath Dev

how to take textbox info pull it apart and populate other text boxes?

Last post 06-16-2013 01:38 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-15-2013 08:38 AM

    how to take textbox info pull it apart and populate other text boxes?

    Hello everyone,

     I have a textbox which users paste data such as "Car make, model, year, etc" as one lump text.

     Can anyone point me in the right direction as to how to pull that apart and take car make throw everything up to a carriage return into a different text box? then do the same for model, again for year, etc.

  • 06-16-2013 01:38 PM In reply to

    Re: how to take textbox info pull it apart and populate other text boxes?

    Hi Doodguy and welcome,

    Use the substring-before and substring-after functions to extract out what you need. To get the substring before a carriage return, you'll need to encode the CR-LF (\r\n, &#13&#10) sequence. I can't remember how to do this, so I just used another multi-line text field (field2) and entered return followed by a delimiter ('#') and then used substring-before(field2, '#') as my search for the first substring. For example: substring-before(field1, substring-before(field2, '#')) will extract the first line before the carriage return for field1 if field2 is set to carriage return plus the sharp (#) symbol. You can play with the text functions to extract other items.

    Good luck! 

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.