Breaking up text into multiple fields

The data in a field that I am reading contains something like
this :
Los Angeles, California 99999-0000
What is the technique to break it up into three separate
fields, so that a field name city would contain Los Angeles,
a field name state would contain California, and a field
named zip_code would contain 99999-0000 ?
Thanks for any help.

Is it possible to have each field separated by a comma? Space
delimiters won't work since not all cities & states are one
word (ie. New York, New York) however a comma delimiter would allow
you to use simple list functions to extract the data.
If this isn't possible but the data is always in the format:
city<comma>state<space>zip, then you could extract the
city using comma as the delimiter and then extract the zip code
using the ListLast() function with space as the delimiter which
would leave you with the state as the remaining text. This would
only work however if your data is consistently in the format
described above.
Failing this you could build two tables with states and
cities and then use them to identify valid states and cities and
extract the data that way.
cheers

Similar Messages

  • Breaking huge text into multiple parts.Please help..

    Hi all..i'm urgently need any attention here..pliz help to solve this problem..
    The description of my problem is like dis >> let say now i have 100 length of a text. Now , i need to break it into multiple parts, accordingly to the max lenght of a part for one time is 30.So, it should be to returned like dis >>
    text [1]="blablabla.." -->text.length =30
    text [2]="blablabla.." -->text.length =30
    text [3]="blablabla.." -->text.length =30
    text [4]="blablabla.." -->text.length =10
    I have write a pieces of code that may explain what i try to do..but its not really work..i hope anybody out there can help me..thanks a lot..
    code:
              for (int i=0; i<fullMsg.length(); i++){
                   singlLen ++;
              if (singlLen == LEN-1){
                        System.out.print("splitMsg: i="+i+"\n");
                        System.out.print("splitting new msg["+msgCnt+"]="+fullMsg.substring(beginPos, i)+"\n");
                        msg[msgCnt] = fullMsg.substring(beginPos, i);
                        singlLen = 0;
                        msgCnt ++;
                        beginPos = i+1;
                   }

         public static void main(String[] args) {
              String LONG = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
              int MAX_LEN = 30;
              ArrayList<String> strList = new ArrayList<String>();
              int i = 0;
              while (i < Math.floor(LONG.length() / MAX_LEN)) {
                   strList.add(LONG.substring(i * MAX_LEN, MAX_LEN * (i + 1)));
                   i++;
              // now get the remainder
              i--; // decrement it to get how many MAX_LEN chunks we have
              int remainder = LONG.length() % MAX_LEN;
              strList.add(LONG.substring(MAX_LEN * (i + 1), MAX_LEN * (i + 1)
                        + remainder));
              System.err.println(strList.toString());
         }I'm not sure if this is what you want... Say you have 75 chars in string.
    Prepares an array with 3 strings,
    first len 30,
    second len 30,
    last len 15
    makes 75 in total

  • Copy text from multiple fields to one field

    I would like to copy text from multiple fields into one field. Each of these smaller fields will only be allowed to have one character. The larger field will not be able to be edited.
    So far, I have thought of creating a naming heirarchy for these fields. I was going to then call upon the array of the parent and set the value of the parent to equal this array.
    var parent = this.getField("everything");
    var array = everything.getArray();
    var v;
    for(parent=0; parent<array.length; parent++)
    v = a + " " + v;               //Im guessing this line is incorrect
    parent.value = a;
    Any suggestions? or a better way of doing this.
    Thanks

    The code sample you provided is using AcroForm scripting and will not work in this form. There is another post similar to this one...have a look at this one it might help you out. It is doing the opposite of what you want but the concept of the loop and how each field is addressed inside ofthe loop is what you wil need.
    http://forums.adobe.com/message/2954517#2954517
    Paul

  • Auto populate text fields with a trigger such as entering text into input fields in ADF

    Hello all,
    I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
    I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
    its not working ..
    is there any way to achieve it
    Regards,
    Shakir

    Hi,
    Always mention your JDev version.
    The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
    If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
    -Arun

  • Inserting text into a field at the current cursor position

    Does anyone know how to insert text into a field at the current cursor position? I would like it to work similar to the Syntax Palette in Forms. I cannot figure out how to retrieve the current cursor position in order to manipulate the text.
    Any help would be great.
    Thanks.

    Hi,
    If the button and the textfield are on in the same subform then this code should work in the click event of the button
    (This is JavaScript code so make sure the code is set to JavaScript and Client on the drop downs in the script window)
    (assuming the name of the textfield is TextField1)
    TextField1.rawValue = "some value";
    If they are in different subforms then you have 2 options
    Please note in both these options it is easier if the subforms have names ( I am assuming this to keep samples simple)
    option 1 -
    use the parent object to move up the tree till you are at the same level as that of the subform that contains the textfield
    e.g. 
    (Click Event of the button)
    this.parent.subformname.TextField1.rawValue = "some value";
    option 2 -
    Use the resolve node to make your way down from the top level of the form
    xfa.resolveNode ("form1.subformname.TextField1").rawValue = "some value";
    Hope this helps
    Malcolm
    p.s. I am making assumptions as the image/file you attached did not appear for me.

  • Using numberd buttons to enter text into a field

    Hi all, was wondering if I had 10 seperate sprites acting as
    buttons on a page, which will be numbered 0 -9, is it possible to
    use them to enter text into a field. e.g.
    If the user presses the sprite with a number 1 on it, would
    it be possible to have a 1 displayed in an edit field. I need to
    pretend as though im using a remote.
    thanks

    You can create a behavior that will allow you to set a
    variable for each
    button. When you assign the behavior to your button sprite,
    it'll
    prompt you to enter the ButtonNumber property. Haven't tested
    this yet,
    but something like this should work:
    global gNumberEntered
    property ButtonNumber
    on getPropertyDescriptionList
    description = [:]
    addprop description, #ButtonNumber, [#comment:"Enter number
    to assign
    to this button", #format:#integer, #range:[1,10], #default:
    1]
    return description
    end getPropertyDescriptionList
    on mouseup
    sprite(the currentSpriteNum).member = member("buttonOver")
    gNumberEntered = ButtonNumber
    cursor -1
    end
    on mouseEnter me
    sprite(the currentSpriteNum).member = member("buttonOver")
    cursor 280
    end
    on mouseDown me
    sprite(the currentSpriteNum).member = member("buttonDown")
    end
    on mouseLeave me
    sprite(the currentSpriteNum).member = member("buttonUp")
    cursor -1
    end

  • Breaking a pdf into multiple pdf's

    I have a 250 page pdf.  each page represents a departments information.  Is there a way to break apart that pdf into single pdf's but using part of the file to name the pdf?
    for example, if the first report has a title that contains department 123, I could extract that page and name it department 123.
    The only want I know how to break a pdf into multiple pages is to use the document / extract pages and select Extract pages as seperate files.  But when I do this it uses the name of the exiting file and adds a number to it.

    You will have to select a subforum, e.g. Creating, Editing & Exporting PDFs, or Acrobat SDK (since you probably need to write the functionality you want by yourself).

  • Breaking up audiobooks into multiple tracks

    I bought an audiobook from itunes that came as only 5 tracks. The book is 11 hours long and it would be really nice to be able to start closer to where I left off on my ipod. does anyone know how to edit mp4s to break them into multiple tracks?

    Is it possible to have each field separated by a comma? Space
    delimiters won't work since not all cities & states are one
    word (ie. New York, New York) however a comma delimiter would allow
    you to use simple list functions to extract the data.
    If this isn't possible but the data is always in the format:
    city<comma>state<space>zip, then you could extract the
    city using comma as the delimiter and then extract the zip code
    using the ListLast() function with space as the delimiter which
    would leave you with the state as the remaining text. This would
    only work however if your data is consistently in the format
    described above.
    Failing this you could build two tables with states and
    cities and then use them to identify valid states and cities and
    extract the data that way.
    cheers

  • Safari crashes when entering text into entry fields

    I recently bought a MacBook 2.0 (White) and have set up accounts for multiple family members. On one (standard) account, Safari immediately crashes as soon as you try to enter text into an entry field, e.g. to do a search on Google or Yahoo. I've already tried dragging the Safari pref files to the desktop and icon files to the desktop and rebooting both Safari and the entire machine with no success. However, if I log onto any of the other accounts, Safari works fine. Initially, (for about two weeks), it worked fine, it just started acting like this recently. Toggling Java and Javascript off, also doesn't solve the problem. I'm about to create a new account and trash this account entirely, but I was wondering if anyone has seen this problem and knows what's gone wrong.
    2.0DualG5, 15"PBook1.5, MacBook2.0   Mac OS X (10.4.6)  

    Thanks Yang, you pointed me in the right direction. I was able to edit and delete items in the Autofil - Other Forms, but when I tried to do the same thing on the Autofil - Address Book Card, it crashed immediately. Further investigation showed that if I tried to open any applications related to the Address Book like Mail or Address Book itself, they immediately crash also! This is kind of weird because this account hasn't been set up for Mail and as far as I know there are no entries in the Address Book. If I uncheck "Using info from my address Book card", Safari doesn't crash, so now it looks like the problem originates from Address Book or possibly Mail.
    RadiCal

  • How can I have text from multiple fields on one layer, copy to one field on another layer?

    A little help please as it's been years since I've done any coding of any sort.
    So I have a 4 page document with various field types.  I have a document script that gets "TodaysDate" that works perfectly and a few other scripts as well.
    So what I'm trying to do is find a work around for the following:
    I have 3 fields - SURNAME, FIRSTNAME & dob.
    And I want what is typed into these fields to populate into 1 field.  And according to this tutorial (http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript) it's not exactly possible.  At least I think that's what it says.
    However I'm hoping that maybe I could have a Submit button at the end of that document that when clicked would copy the text from those 3 fields (that I would have on 1 layer) into 1 field on a 2nd layer.  Is that even possible??
    I'd also like to have the document Print, Save (using the text in the field on the 2nd layer as the file name), Email (using the text in the field on the 2nd layer as the subject line) and Export to a specific Excel spreadsheet. 
    I don't want much do I?
    I'm using Acrobat 9 Pro on a Windows PC but also have access to Acrobat 8 Professional.  And I'm going to want the form to run in Acrobat Reader X.
    So far I have for the 3 fields into 1 on another layer:
    function buttonClick(){
    if(buttonClick==false)
    event.value=this.getField("SURNAME"+"-"+"FIRSTNAME"+"-"+"dob").valueAsString;
    But I have no idea how to call the event.value from 1 layer to another or if any of that code above would even work at all.
    I have a script that I believe will work perfectly for the Save and Email function:
    Using the “doc.submitForm()” function
    // This is the form return e-mail. Its hardcoded
    // so that the form is always returned to the same address
    // Change address on your form
    var cToAddr = "[email protected]";
    // First, get the client CC e-mail address
    var cCCAddr = this.getField("ClientEmail").value;
    // Now get the beneficiary e-mail only if it is filled out
    var cBenAddr = this.getField("BennyEmail").value;
    if(cBenAddr != "") cCCAddr += ";" + cBenAddr;
    // Set the subject and body text for the e-mail message
    var cSubLine = "Form X-1 returned from client"; var cBody = "Thank you for submitting your form.\n" + "Save the mail attachment for your own records";
    //** Send the form data as an XML attachment on an e-mail
    // Build the e-mail URL
    var cEmailURL = "mailto:[email protected]?cc=" + cCCAddr + "&subject=" + cSubLine + "&body=" + cBody;
    this.submitForm({
                cURL: cEmailURL,
                cSubmitAs:"XML",
                cCharSet:"utf-8"
    I'll work out the Export to Excel thing later as I've seen many tutorials on that.  But can I do the 3 fields to 1 thing at all?
    Please Help!!!

    Sorry Gilad.  I hope I'm not getting on your nerves (too much) but as I said it's been a while since I did any formal code. And I'm trying to do this code for a work document but I'm doing it in amongst so many other things I do for my job that it's difficult to get the time to concentrate for longer than 5 mins.
    I didn't get a chance to try that code until just now.  I guess I asked again as I thought (from what I'd read) that it wouldn't be that simple.
    So I've added that code and I get no errors.  But it doesn't appear to be doing anything either.  I've added the code like this in the Custom calculation script of a separate field I've called FileName.  And on the Button i'm using I've added:  buttonClick()
    function buttonClick(){
    if(buttonClick==false)
              event.value=this.getField("SURNAME").valueAsString + "-" + this.getField("FIRSTNAME").valueAsString + "-" + this.getField("dob").valueAsString;
    So now I'm guessing that becasue i'm not getting an error or a result that I've screwed it up still.  Have I put the code in the correct area?  Have I assigned a the buttonClick() function correctly?

  • How to Split field  into multiple fields in  Import Manager without  delem

    Hi
      Is there any method to Split a record in MDM without using delimitter?
    I dont want to use any delemitter  My field content in Source is  PRODLABELPACK and I want to split it into 3 fields in destination  Field1= PROD
    Field2=LABEL   Field3=PACK
    I know how to split it if the content is PROD_LABEL_PACK .But we dont want to use delimiter in the firld and want to use some substring function
    Regards
    Prashant

    You Can use below FM  SWA_STRING_SPLIT -
    First Use READ_TEXT FM.
    then loop into
    loop at tline.
    Here use 'SWA_STRING_SPLIT' -> Pass tdline and append the text into other internal table.
    endloop
    Thank you
    Seshu

  • Copy Field Formats into multiple fields

    I have a form that has a spreadsheet layout. Multiple fields need to be formatted as currency or date. Outside of using Java scripts is there a way to copy the formatting of one filed to multipe others? I want to avoid Java script because I'm lousy with it.

    Is it possible to have each field separated by a comma? Space
    delimiters won't work since not all cities & states are one
    word (ie. New York, New York) however a comma delimiter would allow
    you to use simple list functions to extract the data.
    If this isn't possible but the data is always in the format:
    city<comma>state<space>zip, then you could extract the
    city using comma as the delimiter and then extract the zip code
    using the ListLast() function with space as the delimiter which
    would leave you with the state as the remaining text. This would
    only work however if your data is consistently in the format
    described above.
    Failing this you could build two tables with states and
    cities and then use them to identify valid states and cities and
    extract the data that way.
    cheers

  • Urgent: How to break 1 Row into Multiple Rows

    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product Sub Product Name Age
    New Car Nissan Tom 49
    New Car Nissan Jack 36
    Old Car Audi Sam 24
    Old Car Jaguar Pint 26
    Old Car Audi Smith 41
    I need to be able to fetch the above data in the below fashion
    Product Sub Product Name Age
    New Car
    Nissan
    Tom 49
    Jack 36
    Old Car
    Audi
    Sam 24
    Smith 41
    Jaguar Pint 26
    Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!

    user9086775 wrote:
    Hi Experts,
    I have a requirment where i need to fetch parts of a single row into multiple rows from a singlt Query, i am sure it is possible using Pivots but just cant figure out an approach. Any help on this is highly appriciapted.
    Requirment:
    This is a sample set record in a table
    Product     Sub Product          Name    Age
    New Car    Nissan                   Tom        49
    New Car    Nissan                   Jack         36
    Old Car      Audi                     Sam         24
    Old Car      Jaguar                  Pint          26
    Old Car      Audi                     Smith       41
    I need to be able to fetch the above data in the below fashion
    Product     Sub Product          Name    Age
    New Car
    Nissan
    Tom        49
    Jack        36
    Old Car     
    Audi            
    Sam        24
    Smith      41
    Jaguar                   Pint         26Please help with ideas as to how can i achive the above without using PLSQL.
    Thanks in advance!You should be doing this in the client on not in the DB. Use the reporting tool that you use to do this.
    For example if you are in SQL Plus you can use the BREAK command.

  • Today's date dynamically entered into text field that user enters additional text into same field.

    Trying to have today's date dynamically entered into a repeating table row textfield when the button is clicked to create each repeating row. The user can then enter addtional text into the same text field next to the date.
    Example:
    [4/25/2012] This is the text the user entered.
    Today's date is populated in each update row created when the "Update Row" button is clicked.
    The following script works but only for the first instance, not the second, third, forth, etc...
    Click event: (JavaScript, client)
    this.resolveNode('Table2._RowB').addInstance(1);
    xfa.resolveNode("Table2.RowB.#subform.Update").rawValue
    Thank you,
    ~Don

    Hi Don,
    Does this solution cover the above problem? https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw
    Niall

  • Add Text From Multiple Fields Into One

    I'm creating a form in Acrobat 9 that lets you fill in information for four cars. For each of the four cars, there is a text box for Manufacturer, Model, and Year. I have the boxes labeled Manuf1, Mod1, Year1, Manuf2, Mod2, etc.
    Then I two other text boxes called Text1 and Text2. In Text1 I want all the manufacturers listed together( example: Ford, Chevy, BMW) and the same thing for the models in Text2. What would be even better would be if in Text1 and Text2 the names could be seperated with "or".
    Is there a javascript that can do this and not repeat a name (if, for example, the first two cars were both Ford, the third was BMW and the fourth was Chevy, I want Text1 to display: Ford or BMW or Chevy, not: Ford or Ford or BMW or Chevy)?
    Thank you for the help!

    The code sample you provided is using AcroForm scripting and will not work in this form. There is another post similar to this one...have a look at this one it might help you out. It is doing the opposite of what you want but the concept of the loop and how each field is addressed inside ofthe loop is what you wil need.
    http://forums.adobe.com/message/2954517#2954517
    Paul

Maybe you are looking for

  • Mail icon Bounces but doesn't open

    when I try to open my mail the mail icon bounces once in the dock and then nothing happens. I have auto update so i'm running the latest software. I can retrieve my mail from a website but I can't see my contacts or anything. No other application see

  • Upgrading to camera raw 6.7

    I get an error message when I try to upgrade CS5 to camera raw 6.7 for the mac. Has anyone faced this issue?

  • Table Name Issue of CAF Entity Service

    Hi All I have a problem in the following scenario :-- I have created a CAF project named xflit_01 in local development. Another CAF project xflit_02 is created in local development of another machine's NWDS but both the project has a same entity serv

  • Archiving video

    I am converting some old Hi8 to DV. I would like to "capture" in iMovie and archive to a DVD. I want the video in a uncompressed format that I can later reload into iMovie and edit. I have worked with "Export" but have not found the setting that I fe

  • Can't by anything in Apps and Games

    Hello! I using my Bank's plastic card for buy, but In Games or other Applications, if I try buy anything, I get this error: "Your buy can't be finished. For help contact in iTunes tech support: www.apple.com/support/itunes/ww/.