Write a script for form

Can someone help me to write a script? What I have is a drop-down list (named Relation1) with three options; Self, spouse and significant other. A subform1 and a Subform2each subforms have the same fields. The user end would first fill all the fields of the subfrom1, and then they came to the drop-down list of the list "Relation1" - say the selection 'self', what must happen, it's fields of subform2 pre-populate with the info to end-users, they typed in the fields of subform1.

Here's what my hierarchy looks like:

Form1

Page1

PatientInfromation (Subform1)

FirstName

LastName

Address

Date of birth

Sex... etc...

Relation1 - combo

Gites

Spouse

Sig.Other

PrimaryInurance (Subform2)

FirstName1

LastName1

Address1

DOB1

Gender1... etc...

I have big problems with finding how to write these lines upwards, so if someone could give me a code base, I can understand the rest I don't know. Also, I don't know if I have to use FormCalc or JavaScript. I tried and tried to figure it out by reading questions on the forum for the past 7 HOURS on my own.

Any help would be much appreacited.

Hello

There could be many things - welcome in the world of LC Designer!

However, there are two ways to sort out what is happening...

First of all, when you're in the script editor there is a "Check syntax" button above the window. Clicking on this will check the current script. If there is a syntax error that appears red:

Then, when you are either found form in LC Designer Preview or Acrobat/Reader, then pressing command + J to display the Javascript Console. If there is an error in the form, it will help you to find, interpret and solve - Javascript Console is your friend:

I am convinced that you will be able to get this working, it will take just a little cooperation.

I didn't know your form, so here are some suggestions that may or may not be applied:

  1. Name of the objects that you will, this includes pages, subforms, and objects. This makes it so much easier to reference objects in the script.
  2. Try and stay away reserved words to name objects. For example 'null', 'name', 'x', 'h' etc...
  3. If you are in the script editor and you want to reference an object in the script there is a very easy shortcut. Place the cursor on the object and press on/hold Control. The mouse turns into a 'v '. Select the object and the reference will automatically be inserted into the script. The smart real thing is that LC Designer put everything as the reference needed. If the two objects are the same subform, it will put only in the name of the object. If the objects are on different pages, or some subforms are unnamed, then he put in the fully resolved node. You really need to try this; master it. IT WILL REALLY HELP YOU. When you look at the script in my example, I typed all sentence that at all. Just point / control / click.

If a letter is on the spot or the smallest of syntax errors, the script fails. The tools above will help you.

Try and stowage, where is the problem and I can help you. It will also help if you can share the form. There are Acrobat.com or other file sharing sites. You can also send me a private message and I will give you an e-mail address.

Have a good weekend!

Niall

Tags: Adobe LiveCycle

Similar Questions

  • How to write a script for date get to the Clipboard

    Hi experts,

    How to write a script for date get to the Clipboard.

    the date format will be like this:

    05 - may

    respect of

    John

    Thanks guys, thanks Sanon

    I finally use the .bat doc

    like this:

    @@echo off
    for /f "delims =" % in (' wmic OS Get localdatetime ^ | find ".") "") Set "dt = %% a"
    the value "YYYY = % dt: ~ 0, 4%.
    the value "MM = % dt: ~ 4, 2%.

    If MM % is 01 set MM = January
    If % MM == 02 set MM = February
    If MM % is MM value = March 03
    If MM % is 04 MM value = April
    If MM % is 05 MM value = may
    If MM % is 06 MM value = June
    If MM % == 07 set MM = July
    If MM % is MM value = August 08
    If MM % is MM value = September 09
    If MM % is 10 MM value = October
    If MM % is 11A set MM = November
    If MM % is game MM 12 = December

    the value "DD = % dt: ~ 6, 2%.
    the value "HH = % dt: ~ 8, 2%.
    the value "Min = % dt: ~ 10, 2%.
    Set "s = % dt: ~ 12, 2%.

    Echo DD - MM HH % %% % Min | Clip

    It works

    respect of

    John

  • Is it possible to write a script for underlined text export to PDF?

    When I make changes in the financial document, I must emphasize this purpose to show what I edit, these underscore was called "markup". And then print (paper version) and gen (PDF) of the amendment, which means I have to print and gen text underlined (or called markup text) after modification.

    sample PIC:

    back markup.jpg

    If:

    Customer requires a new version of the markup, which means I have to change the last beacon color (color of the underline to the last amendments) in 'back' and then make new 'red' as this markup:

    red markup.jpg

    What I want:

    is it possible to write a script for printing and gen only markup in the document text all open

    and I want two versions

    (1) all text markup gen no matter the color of the underline

    (2) the red color of the markup text gen

    Thank you!

    Hi HarveyLiu,

    Why, you ask? It will export the pages who pointed out the text.

    var doc = app.documents;
    app.findTextPreferences = null;
    app.findTextPreferences.underline = true;
    for(var i=0;i
    

    Kind regards

    Cognet

  • Can someone help me to write a script for Soundbooth

    If I have 50 files in C:\MyMusic and you want to

    Game Volume in Soundbooth CS5 how can I write a script for this?

    The only other way that I saw him do this with a library of that size is by Steve DeKorte SoundConverter. It would be tedious to do, but there is a feature to "normalize volume" on all files being converted. E than another inconvenience is that as long as you "convert" MP3 to MP3, you must save the files "converted" to a different directory. It won't crush during the standardization process.

    I had a library of more than 92 000 songs in 14 000 folders and subfolders 46 000 until last October. I had been there twice to "clean up and mormalize ' it more than six years." The transport entered on the drive that I was preparing to back up everything on DVD, and I have been unable to recover the data on the disks when it happened. I was duly upset when I lost all this music, but as I look back over the last eight months, I had a lot less worries ' tinkering ' with all these files all the time.

  • Two part question: 1 How can I write a script for long Division, 2. How can I make my form?

    1. I have a field where I need to write a formula for a division problem: (power/population) / 365.  When I use the simplified field notation I get an error: the entered value does not match the format field.  I want the answer as a number with no decimal point.  If I format the field to 'no format' I don't get an error message but the answer comes with up to 10 digits after the decimal point.  I'd rather have the answer in integer without figures after the decimal point.  How can I write this in the custom calculation script?

    2. on accessibility - I never checked on the display/a Mode and unlocked the Acrobat/PDF compatibility.  Some users do not have a problem by filling out the form, but others are not allowed to fill that PDF/A is enabled for their document.  Is this something on their end?  Or is it something on my end blocking them?

    If you multiply by 100, it appears correctly. But if you need to retain the value of the field, you need to use a script to Format custom instead. If you need help, post again.

  • Script for layer redundant batch delet

    I have thousands of files in different folders, each file has the same layer named "job Info". Can someone help me to write a script for led this layer per-folder?

    layerInfo.jpg

    I expected, the script tells me that I need to select a folder, then it can automatically open files, del layer "job info" then save the file, rewrite, close file

    Hello

    Try this.

    var folder = Folder.selectDialog ("Select the root folder");
    var myfiles = [];
    getsubfolderfiles(folder);
    for(var i =0;i -1){
                    myfiles.push(filelist[i]);
                }
            }
        }
    }
    

    Kind regards

    Cognet

  • A simple script for you, a giant script for me...

    I like a lot of scripts, but script doesn't seem to like me! Can someone help me and write a script for me? What I need is:

    1 unlink all of a double

    2. a loop that goes through each block of text in the spread and, at the end of the text contained in each of these frames inserts an empty paragraph. (The frames contains text graphics and online)

    This month of may seems strange, but I need.

    Best regards and thanks in advance

    Maria

    I like a lot of scripts, but script doesn't seem to like me! Can someone help me and write a script for me? What I need is:

    It is easier for you to show us what you have, and then we will fix it for you or tell you what the problem is. Next, you'll learn something!

    1 unlink all of a double

    This one is easy - unless you're worried about groups within groups?

     app.activeWindow.activeSpread.groups.everyItem().ungroup()
    

    If that's all-the-way-down groups, on the other hand, well, it might be more than one line...

  • How to create a script for the calculation of the VO2max using text on a pdf form field values.

    I'm trying to create a script that calculates the VO2max based on user input in several text fields.

    My form is set up so that the user can enter values in the 4 fields of text:

    1 weight = weight in kilograms

    2. age = age in years

    3 time = time to walk 1 mile in decimal

    4. the heart rate (HR) = heart rate recovery immediately after you have finished walking 1 mile

    The VO2max equation that I use is:

    VO2max = 132.853 - (0.1692 * weight)-(0.3877 * Age) + (6,315) - (3.2649 * time)-(0.1565 * HR)

    After the user enters values in 4 text fields, I want the text of VO2max field automatically calculate the above equation and display the result to the user so that the user doesn't have to get all those numbers into a calculator.

    Any suggestions on how to write the script?

    Assuming that your domain names are what you entered in the formula, you can use the simplified field notation:

    132.853 - (0.1692 * weight)-(0.3877 * Age) + (6,315) - (3.2649 * time)-(0.1565 * HR)

    If you want the value to display only after al the data fields are complete you need to use a JavaScript calculation:

    function GetField (cName) {}
    oField var = this.getField (cName);
    if(oField == null) app.alert ("field of error for access to the" cName + "\nPlease verify the name of the field.", 1, 0 ");
    return oField;
    }

    var weight = GetField ("Weight");
    var Age is GetField ("Age");.
    var time = GetField ("Time");
    var h = GetField ("HR");

    Event.Value = "";
    If (Weight.value! = 0 & Age.value! = 0 & Time.value! = 0 & HR.value! = 0) {}
    Event.Value = 132.853 - (0.1692 * Weight.value)-(0.3877 * Age.value) + (6,315) - (3.2649 * Time.value)-(0.1565 * HR.value);
    }

  • Script for random switch between different waveforms

    Hello.

    How correctly to write the script to switch between different waveforms when generating?

    For example:
    We use the niFgen allocate named Waveform VI to allocate three waveforms. When you run the generator, the first forms of wave of work. Then the generator is activated and used in the following waveforms only second and third.

    Or, we have configured 10 waveformsand by train to spend no fixed cyclically between everyone, but only between 2 and 5 waveforms.

    If it is possible to achieve?

    Max O.

    Developer of software and engineering,

    TeSLa.

    Hi Max,.

    Each stage needs, too.  End ifs should take place at the end.  For example:

    If scriptTrigger0
    generate a myWfm0
    on the other
    If scriptTrigger1
    generate a myWfm1
    on the other
    If scriptTrigger2
    generate a myWfm2
    on the other
    / etc...
    end if
    end if
    end if

    Of course, it must all be encapsulated in a repeated structure to continue checking for triggers.

    Kind regards

  • Adobe DC Java Script for the population of conditional field

    I have to write a script in a form that will be contained in a text box and populated by one based on the user by checking a box

    Scenario of

    A form contains two sections, there are two sections Head Office information and accounts payable.  The user saves the headquarters address information for example the street address, city, province, PC, etc.  one moves to section 2 two to record accounts payable information.  The Department accounts payable may be located to one address which is not at the headquarters.  There is a check box labeled "same as headquarters" by checking the box that the user is to identify that this is the same address and I want the form automatically fill the street address, city, province, PC already filled in the section of headquarters.  If the user does not identify the address is the same as the location of the headquarters, the user must manually register the information.

    Is not not a technical developer I'm lost, I tried many sites.  I really miss adobe lifecycle designer and the previous method to create actions.  Help, please!

    My JavaScript to date (sorry it must look not so good):

    this.getField("Same").value;

    If (Same.value! = null) {APStreetAddress.value = HOStreetAddress.value}

    This kind of thing can become a little complicated depending on exactly how you want it behaves. It's simple if you only need the script that will be triggered when the check box is selected, in which case the script of mouse upwards to the box could be:

    Script mouse upwards to the box

    (function () {}

    Do nothing if this check box cleared ix.

    If (event.target.value = 'Off') return;

    Copy the values from the previously filled (probably) the text for the other fields.

    getField("APStreeAddress").value = getField("HOStreeAddress").valueAsString;

    getField("APCity").value = getField("HOCity").valueAsString;

    getField("APPostalCode").value = getField("HOPostalCode").valueAsString;

    Add code to the other fields here

    })();

    Just be sure to use the names of real field.

  • JavaScript for forms

    I'm trying to get this form to calculate a product. I need to read only area that will calculate to be empty when there is nothing to calculate against. I calculated the price of end of expenses by the amount of late fees. The quantity is the field that's going to change by the person filling out the form. So I want the total field to show the cost and it will then be added to the other totals in column and another area will calculate this amount.

    The preview form looks like this:

    Capture2.JPG

    The two white fields are requiring to be empty so that if a user wants to print and fill out by hand, there is a space for them to write any calculated fields.

    Mode change my form looks like this:

    Capture3.JPG

    My Script for the empty field 'US_LateFeeSubTotal' is:

    var A = this.getField("LateFeeQuantity").value;
    var B = this.getField("LateFee").value;

    If (A > 0) event.value = A * B;
    else event.value = "";

    I have oil fields of 'LateFeeQuantity' and 'US_LateFeeSubTotal' defined as number Format. Obviously, I set to 0 decimal places and the other a game to 2 decimals with one $ above the calculated amount.

    When I go to the preview mode and type 1 in the field "LateFeeQuantity", I get the following error:

    Capture.JPG

    What I am wondering if I need to change my formula of 'A > 0' to something like "has! "=" "" or in other words if 'A is not null,' I just don't know what the syntax is or if that's really what my problem is.

    For any help or suggestion would be greatly appreciated.

    He did...

    As I thought, you have included the monetary symbol inside the price field values. Change their default values for just a number and then set their Format option to display the symbol monetary, as with the computed fields and it should work.

  • I tried to write a script, the user can use. This return number file *.tiff associations back using the image viewer is caused each month.

    Original title: automation of file tiff without elevated rights association

    I tried to write a script, the user can use. This return number file *.tiff associations back using the image viewer is caused each month.

    Hi, Unclemarcus2002,

    You would be wiser to post on the Forum TechNet where there is COMPUTER experts.

    http://social.technet.Microsoft.com/forums/en-us/newThread

    Maybe using the ASSOC and FTYPE command in a script will do what you want? I think that these orders would also apply the association throughout the world, rather than on a per-user basis.

    ASSOC: http:

    FTPYE: http:

    Here is an example, that you can try.

    Let's say you have a text file called "foo.bar" and you want the extension .bar always open with Notepad. There is an association for text files, so get him by typing "Ftype | more' at the command prompt (it will make a major announcement). Finally, you'll see the line "txtfile". On mine, it's "txtfile=%systemroot%\system32\notepad.exe %1" without the quotes.

    First create your association: assoc .bar = FooBarText

    Now to assign your request to your file type association: ftype FooBarText=%systemroot%\system32\notepad.exe %1

    You should now be able to double-click the foo.bar file and it will automatically open in Notepad.

    If you already have a Microsoft Office Document Imaging association, I think that it should be relatively simple type of substitution. Use ftype /? for a little more help.

    http://community.Spiceworks.com/topic/119639-Windows-7-automate-file-assocations

  • Sharing of Scripts for pattern recognition

    Hi all

    I need to use the same script for .sdp projects.

    Anyone know how we could do it?

    Thanks in advance!

    It's a called Winwrap basic form, he has his own website https://www.winwrap.com/web2/doc-basic/ which is a useful reference.  MS COM has long been replaced by .NET but of Windows COM objects can be created using Visual Basic or C++ - there's probably a way to use .NET and assemblies, I simply never need a functiont complex enough to require an object. You are showing the references, they are listed in the registry of Windows OCX/DLL objects. Suppose you want to do a database search you would add the ADO MS Library and you can then create connection and recordset objects in the script and access to a database.

    It would be useful to know what's on your WFR project because the AP has a huge layer of script development located above the capabilities of the base product. If you use an AP project, it is wiser to change except the prescribed manner and the code is secured by password, so you can not access it. If you are lost at this level of knowledge then you will find configuration and the use of the BDUS a 3D maze, better get help from companies that specialize in the JAR

  • How to write the trigger for update or delete multiple columns in a table?

    Hello

    I create one in the form of table of sample_emp. In that, every time I want to change of name, team_id, team_leader_id, supervisor_id, manager_id it must store the update-able and old values of those in the job_history table. When I write the trigger for which it shows "ORA-04082 new or the old value not table level triggers. Here is my emp_table. My table also similar job_history like this. Need your help.

    Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6 Heading 7 8 header Header 9
    EMP_IDEMP_NAMEDESIGNATIONTEAM_IDTEAM_LEADER_IDEMPLOYEEMANAGER_IDHIRE_DATERELIEVED_DATE

    --

    Thank you.

    Hi Joel,.

    Venky_prs wrote:

    Hello

    I create one in the form of table of sample_emp. In that, every time I want to change of name, team_id, team_leader_id, supervisor_id, manager_id it must store the update-able and old values of those in the job_history table. When I write the trigger for which it shows "ORA-04082 new or the old value not table level triggers. Here is my emp_table. My table also similar job_history like this. Need your help.

    Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6 Heading 7 8 header Header 9
    EMP_ID EMP_NAME DESIGNATION TEAM_ID TEAM_LEADER_ID EMPLOYEE MANAGER_ID HIRE_DATE RELIEVED_DATE

    --

    Thank you.

    You can try something like this given below to complete the historical table on update and delete.

    create or replace TRIGGER  "CLONE_EMP_UPDATE_DELETE"
    BEFORE DELETE OR UPDATE ON EMP
    FOR EACH ROW
    DECLARE
        PRAGMA autonomous_transaction;
    BEGIN
    INSERT INTO JOB_HISTORY("EMP_ID","EMP_NAME","DESIGNATION","TEAM_ID","TEAM_LEADER_ID","SUPERVISOR_ID","MANAGER_ID"
    ,"HIRE_DATE","RELIEVED_DATE")
      VALUES(:OLD.EMP_ID,:OLD.EMP_NAME,:OLD.DESIGNATION,:OLD.TEAM_ID,:OLD.TEAM_LEADER_ID,:OLD.SUPERVISOR_ID,
    :OLD.MANAGER_ID,:OLD.HIRE_DATE,
    :OLD.RELIEVED_DATE);
    COMMIT;
    END;
    

    Hope this helps you,

    Kind regards

    Jitendra

  • $100 dollars to anyone who can write this script

    Hey guys, I have a lot of PNG images that I need to be of different colors. They are models and we want to offer them in 10 different colors. We have 1000's of images and if each of them will have to be done individually, it should always be. So, I need a script that would do the following...

    (1) to select the folder that contains the PNG images

    (2) import images into Photoshop with each of them being on a different layer

    (3) to choose the colors for the superposition of layers

    (4) to export each layer with their respective colors in a folder chosen by me.

    For example, PNG images have been recorded and exported via a script in Illustrator EPS files. PNG is black because it is the primary color for our designs. We offer other colors, such as white, blue, red, etc. I need the images to be these colors, so customers can see what the design will look like. For each file must be 10 colors, Design1_Black, Design1_Red... etc. I think it would be much easier to try to do all the files individually. Please let me know if its possible. Anyone who can do I'll gladly pay $ 100 for. Thank you!

    Download it ps-scripts-browse/Image Processor Pro / Beta v3_2 on SourceForge.net.

    Write an action for each color that the colors of your image that you need.

    Open until 10 tabs of PPI.

    Each tab will process its own color.

    Please fill in the information of input/output.

    Select the action of color and the name format of output file for each color

    That should set you straight up.

Maybe you are looking for