Extracting specific data from string - InfoPath Dev
in

InfoPath Dev

Extracting specific data from string

Last post 06-17-2009 04:41 AM by ErnestoM. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-16-2009 03:16 PM

    Extracting specific data from string

    Hi!

    Currently working on a database/form for a silent auction (DB is in Access, data is inputted into InfoPath). Want to be able to use our credit card swiper to gather the name and address information from our bidder's drivers licenses. I'm having a problem trying to get the form to intrepret the data correctly.

     First, I have a field named RAW - this is where the raw swipe data goes.

    here is a sample of the data gathered:

    %FLCITY^DOE$JOHN$MIDDLE^STREET^                              ?;6360101816355689201=1206198999010=?

     I am able to grab the state without any problems because it will always be two characters:

    substring(@RAW, 2, 2)

    The rest is where I run into problems, because (of course) the city, street, and first/last/middle names are always different lengths. the string of data at the end ? - ? can be discarded.

     I would think that it would be easy enough to do because of the ^$ - should be able to just select the text between character  3 and the first ^, which would equal CITY

    Text between the first ^ and the first $ would equal LASTNAME

    Text between the first $ and last $ would equal FIRSTNAME

    and so on.

     

    Any suggestions/code?

     

    Thanks!

    Mike

     

     

     

     

  • 06-17-2009 04:41 AM In reply to

    Re: Extracting specific data from string

     Hi Mike,

    Please see the attached InfoPath 2007 form template. The default values of the fields will answer your question on parsing your RAW field. :)

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


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