JavaScript to extract the second line only a field of text as a PDF?  Is this possible?

I have a PDF form created in Acrobat DC.  One of the fields is a for the name and address multi line text field.  The user between that info with carriage returns in a field named the plaintiff that ends in a format such as:

Name

Mailing address

City, State Zip

I need to extract JUST the second line of this field to complete another field of text with these data.  So, my second text field called StreetAddress and would automatically extract only the second input line in the text field named candidate.

Is it still possible?  If so, can someone give me an example of how this can be accomplished?  I don't want to ask the applicant to each line of input in separate fields.

Of course, it is possible. Use this code as the "StreetAddress": custom calculation script

var fullAddress = this.getField("Applicant").valueAsString;
var lines = fullAddress.split("\r");
if (lines.length>1) event.value = lines[1];
else event.value = "";

Tags: Acrobat

Similar Questions

  • I would like to include the grid lines when I export an image... Is this possible?

    IM drawing the plans of landscape and architectural details. I want to stay for the scale of the grid. How can I do this?

    Hi Rusty,

    The grid lines are only there as a guide so unless you actually "draw", they will not be exported with the art.

    I will definitely pass your comments along to the sketch team.

    Sue.

  • How to extract the second sysdate value using the EXTRACT function

    Hello

    I want to extract the second sysdate value using the EXTRACT function.
    When I run the following query I get an error;

    SELECT extract (second OF SYSDATE) FROM dual;

    ORA-30076: field of invalid extract for the source of the extract.

    When I do to extract the month I get the correct result.

    Is there some necessary formatting by specifying the sysdate (or any other date value) in the query. ?


    Thank you.

    You can extract only the year/month / day, day

    SQL> Select extract(year from sysdate) from dual;
    
    EXTRACT(YEARFROMSYSDATE)
    ------------------------
                        2008
    
    SQL> Select extract(day from sysdate) from dual;
    
    EXTRACT(DAYFROMSYSDATE)
    -----------------------
                         20
    
    SQL> Select extract(month from sysdate) from dual;
    
    EXTRACT(MONTHFROMSYSDATE)
    -------------------------
                           11
    
    IF you enter Minute or Seconds
    
    SQL>  Select extract(minute from sysdate) from dual;
     Select extract(minute from sysdate) from dual
                                *
    ERROR at line 1:
    ORA-30076: invalid extract field for extract source
    but with timestamp you can get the seconds
    
    SQL> select EXTRACT(second FROM current_timestamp) from dual;
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  39.473
    
    SQL> select EXTRACT(second FROM current_timestamp) from dual;
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  57.474
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  59.787
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                    .412
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                     .99
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   1.458
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   1.896
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   2.334
    

    Edited by: Viswarayar Maran on November 20, 2008 14:30

  • Extract the first line containing "critical" or "E-Stop" of the last avalanche of line

    Hi all

    I'm watching some test systems by analyzing their audit files.

    In this case, the platform generates several line 100 files in a specific folder. The code below is to find the last file and extract the contents of the last line of the last file.

    Unfortunately, when an error occurs, the main software generates not only one entry, but an avalanche of lines [not a specific quantity of them, depending on how much the alarms are resolved] and I'm now ideas of how I could identify and the contents of the first line containing "Criticism" or "E-Stop" to exit from this avalanche [line avalanche started 22.27].

    As an example, the above program is extract the yellow line, while I need information from the blue line.

    Any idea on how I can do this?

    See you soon,.

    You can add this snippet to the top of your existing code.  I changed the indicator table to a table so I could highlight the line.

  • How to align the second line of text

    indesignhyphen.jpg

    Hi all!

    View text after hyphens - please I would like the second line of the text ('sees. ) http://collectifkoa.com ") to align with the first line / with the dash." Hope this has meaning!

    Welcomeeee suggestions, thank you!

    This is commonly called a "hanging indent." Set up the style with a left paragraph indent equal to where you want the text to line up, then add a negative withdrawal of first line of the same amount.

  • Cannot use spaces at the beginning of the second line of wrapped text

    Hello!

    My question is simple:

    When I got the text inside a text box, and it wraps at the end of the box, why can't put spaces at the beginning of the second line (the wrapped)?

    Because the beginnings of words always wrap to the next line, with spaces accumulate after the word at the end of the previous line.  Any text automatically formatting process skin for it.

    If you want seats at the front, press return first, to force the start of a new line, and then type your spaces.

    -Christmas

  • Tabs on the second line in TOC, LOF (all generated lists)

    When I generate a table of contents or LOF or any list generated, tabs and leaders come out well - on the first line, but if there is a particularly long section, there are a few of my medical clients on their subtitles, the number is not transmitted to the right. The solution is to put a manual back somewhere in the first line, then tab twice manually on the second line. This process is feasible on the page reference or in the format of paragraph somehow?

    Thanks in advance.

    This may or may not work, but it works for me, most of the time.

    In the style of paragraph TOC, all styles with line break problems, change the criteria of word spacing to

    Minimum = 275%

    Maximum = 325%

    Optimum = 100%

    These values look weird that the optimum is outside the range of min - max. I think what makes FrameMaker is use the numbers for min - max to decide where the line break, and then set the spacing to 100%, the optimum. This will cause a line break half an inch or so from the right edge. If you want to break further, add 100 to the minimum and maximum values, but allow optimum 100%.

    I don't know, but it may also require hyphenation go off, as well as allow automatic tracking. You have to experiment if you need these tours on.

    Good luck

    Van

  • How to recover the second line of a table

    Hello

    Could someone let me know how to recover the second line of a table without using the coumn the names of columns in the table.

    By default the table EMP or used in the case of scott connection can be used as an example of table.


    Concerning
    select e.* from(
    select e.*,  rownum rn from emp e)e
    where e.rn =2
    

    did you expect that?

  • Distiller will suddenly end/crash the * SECOND * time I open a file for conversion to PDF.

    The subject says it all: Distiller will suddenly end/crash the * SECOND * time I open a file for conversion to PDF.

    But I think I have an idea why this is happening. In general, I use Distiller to convert EPS or PS files as PDF files. In addition, almost without fault, I incorporate the required (only of Type 1) fonts directly in files EPS/PS (using the required format to PFA) so no local fonts on my computer are needed to be looked at to distill in to be embedded in the file PDF. they are already in the EPS/PS files.

    But yesterday, I tried to convert EPS/PS files to PDF using Distiller in which I had NOT embedded fonts Type 1 (PFA format, of course) in the source of EPS/PS files. All first this conversion would work (in which I select "open" and choose an EPS/PS file for conversion), but after this initial conversion, the * SECOND * time I clicked "Open" the file, Distiller would immediately close/crash.

    Then, I searched the web for answers and discovered that some people have trouble distilling to initialize if all their computer system fonts were read-only. So I went back to my EPS/PS files and embedded fonts Type 1 (PFA format) required in them and then - as if by magic - distill worked without a hitch: I could open and convert any number of them in succession, with distilling never close / crashing.

    Then, I found the reason why distilling had been crashing at the second attempted to open a file (once again, simply by pressing the "open" button to find a file to convert, * no * after selecting a file) must have something to do with distilling scanning fonts installed on my computer, when there was no PFA font incorporated to make reference to , and a read only font on my system was the cause of the problem. However, I have looked in both places of logic where my fonts must be located (c:\psfonts and c:\windows\fonts), but found * no. attributes * files fonts defined in 'read only' so, I'm stumped.

    I use Distiller Pro 10.1.1316 (acrodist.exe) on a machine to earn 8.1. I found similar positions, which dates back to 2004, about Distiller crashing immediately after opening when certain fonts are read-only; I haven't found a post about anyone successfully using Distiller to convert EPS or PS to PDF and then have the program crash when the "Open" button is pressed subsequently. The clues, anyone?

    Background: Distiller Server is a product discontinued long - ago - use of Distiller server is now simply prohibited, and LiveCycle PDF Generator is available for servers.

    Since you are not using Distiller Server and this forum is essentially abandoned, I recommend that you try the Acrobat - forum creation (etc.) instead.

  • When I installed for the first time the creative cloud I did not fit into the second computer and now I don't know how to do this. Can someone help me?

    When I installed creative cloud for the first time I was not installed in the second computer and now I don't know how to do this. Can someone help me?

    Hello

    Please refer to the help documents below to download the application Adobe CC:

    Creative cloud to desktop

    Download, install, update or uninstall applications

    Kind regards

    Sheena

    Moving to the cloud creative download & install

  • I want to use the registration of custom with hyper-site domain object merges? Is this possible?

    I want to use the registration of custom with hyper-site domain object merges? Is this possible?

    Hey,.

    At that time, saving custom object data cannot be used with following:

    • with Hypersite field mergers;
    • with the research data on the data in the field, only the number of overall;
    • on off key Dynamic Content in the emails

    Thank you

  • I want to send an email manually with the fields email drives custom object? Is this possible?

    I want to send an email manually with the fields email drives custom object? Is this possible?

    Hey,.

    Yes, however, the object record Email custom fields only fill with default values. For the custom field object Record is filled, it must be sent via the event Actions or a generating program so that he knows in which case it is associated.

    Thank you...

  • I want to buy a Apple Watch in the Canada and use it and load it in Ireland. Is this possible?

    I want to buy a Apple Watch in the Canada and use it and load it in Ireland. Is this possible?

    Hello

    If you buy a Apple Watch the Canada, it will be completely compatible with your iPhone in Ireland.

    There are no regional differences in the hardware specifications for the watch, which can be configured to use your preferred language and format of the region.

    The included USB adapter pins will be located at the Canada. However, for charging your watch via the food in Ireland, you can use the charge cable provided on the magnetic head with a real 5W Apple (iPhone) or 12W (iPad) USB power adapter. You can also buy an extra Apple USB power adapter for your watch the Apple Store online for the Ireland:

    http://www.Apple.com/IE/shop/product/MD812B/C/Apple-USB-power-adapter?FNODE=83

    Service of the material to the title of the one year limited warranty is also always available in Ireland.

  • HI, I'm wanting the form tool allows you to create multiple copies of documents with customized in each information fields. From excel data. Is this possible?  Thank you, Charlotte

    Hello

    I am keen on the form tool allows you to create multiple copies of documents with customized in each information fields. From excel data. Is this possible?

    Thank you

    Charlotte

    This is called a fusion and mailing. There is a possibility of Embedment in some versions of Excel (via the Acrobat PDFMaker plugin), or it can be done using a script.

  • JavaScript is delete the wrong line of table

    I created a table in livecycle are 8.2. I have buttons add and remove lines. The Add button works fine, but the delete button removes the wrong line. For example, in preview mode PDF, if I add three rows and try to remove the third, the second is removed.

    To add a line, I use the code:

    UserTable._Row1.addInstance (1);

    To delete a line, I use the code:

    UserTable._Row1.removeInstance (1);

    I tried many variations I found online, include (this.parent.index) and the (real). I don't know anything about javascript other than that I used for this form. Can someone help me?

    Thanks in advance!

    Hello

    The setting for the addInstance() is the value 1 (true) or 0 (false) and it is about if the new instance will be merged with the data model.

    When it somes to removeInstance(), the parameter is the instance number you want to delete, based on a system of numbering from scratch.

    So if there were four instances of a repeating line (line 1), then the numbering would be Row1 [0], Row1 [1], Row1 [2] and Row1 [3]. If you want to remove the second instance of the script wouls look like

    _Row1.removeInstance(1);
    

    Here are a few examples, have a look at the delete line key:

    https://Acrobat.com/#d=X1msu65emlM10IWKxkiUyw

    https://Acrobat.com/#d=tIpEHFadQtSOefZkU9EBfQ

    https://Acrobat.com/#d=RZ1lzX23 * u7L4N9rtWCYPQ

    Herein, you will see that I used "this.parent.index" as a parameter.

    Hope that helps,

    Niall

Maybe you are looking for

  • Favorites & Safari on Horiz. iPhone?

    I love my iPhone (iOS 9.3.4) 6s but using Safari with it turned horizontal is a waste of time! I turn to facilitate the reading of the text on the screen "large", but for some time when I do this I get a mosquito net for Safari, the other half of my

  • DVD - RAM drive on a Satellite Pro M40 with MS Vista Business

    HelloI updated my MS Vista operating system now that it has been launched. Everything works fine, except on my CD player. I've not managed to get a driver so can't read music and DVDs. I would appreciate any advice you can offer with this. Kind regar

  • Modules Bluetooth compatible Tecra M1

    Hello! I would buy a Bluetooth for my M1 in 2003. So far, I found a few BT modules, but they the the part number are different and I feel a bit confused. Does anyone have an o list all modules compatilibe?Thanks in advance.

  • Can I select polymorphic instance of DAQmxCreate channel selection enum or ring?

  • New Windows key

    I recently restored my computer system hp pavilion windows vista laptop. The computer works fine until the home screen after logging in, there an invalid windows and ask you to provide a new product key. I tried to type in the original key, but says