If then statement help

Thanks in advance for your help. I work on a PDF form and has difficulty with a logical statement (If Then). Then the field (TotalEligibleServiceCatchup) should be the least of the three amounts: TotalElectiveSalaryDeferralMinusYearsOfServiceCatchup, LifetimeMinusCatchupAmount, or $3,000. In other words, if the Total salary deferral less years of Service catch-up is like $3,000 and life less amount of catch-up is greater than $3,000; the value of the calculated field is $ 3,000. If one or both of the first two values are less than $3,000, the calculated field is the least of these values.

Thanks in advance for your help.

In this case, you can use this code as the custom of your domain calculation script:

var v1 = +this.getField("TotalElectiveSalaryDeferralMinusYearsOfServiceCatchup").valueAsString;
var v2 = +this.getField("LifetimeMinusCatchupAmount").valueAsString;
event.value = Math.min(3000, v1, v2);

Tags: Acrobat

Similar Questions

  • Else if then statement help

    Hi, I'm doing a script for a submit by email button pick up two fields of the subject - an id and the date line.  The problem is there are two date fields and I want only to pick up one of them.  So if the first is empty (that is, "home_insert_date") he will get the second one (i.e. "apt_insert_date"), and if the first is filled, then it will ignore the other.

    Here's the current code that I have.

    var parts = getField("newspaper_flyerid").value + '-' + getField("home_insert_date").value + getField("apt_insert_date").value
    this.mailDoc({)
    cTo: " [email protected] ", "
    bassujetti: parts,.
    });

    Thank you very much!

    Try this:

    var part1 = this.getField("newspaper_flyerid").valueAsString;
    var part2 = this.getField("home_insert_date").valueAsString;
    var part3 = this.getField("apt_insert_date").valueAsString;
    
    var subjectLine = part1 + "-";
    if (part2=="" && part3=="") {
        subjectLine += "missing date";
    } else if (part2!="") {
        subjectLine += part2;
    } else subjectLine += part3;
    
    this.mailDoc({
        cTo: "[email protected]",
        cSubject: subjectLine
    });
    
  • New on Adobe need help with an if then statement

    Hi, I really like what ADOBE Pro 9 can do with forms and neat and everything is included.

    I'm having a problem trying to understand an if then statement for one of my forms and how to make it executable.

    Here is what I have

    I.          Cigna Medical                                           

                (10)       single                                     $  44.00

                (11)       Employee & Child (ren)              $  82.00          

                (12)       Employee & Spouse                 $  99.00                      

                (13)       Family                                     $125.00                      

                (14)       Decline Coverage                         $0.00          Choice: _        Amount: $_

    An employee will be choice an optiopn 10-14 and but that number of choices. After I am about to fill with this number.

    For instnace, if an employee takes option 11, choice: 11 and amount: $ 44.00

    I put the options in a menu drop-down. The drop down menu is titled CignaMedical and Amount_1 title for amount: $_ and I made a text box.  I put this code: if (this.getField("CignaMedical").value == '10') {}
    Amount_1 = 44.00} tab calculation of properties for the Amount_1 of text box on the custom calculation script tab.

    Any help is greatly appreciate

    Yes, you can use an if-else if construction. Something like that (I got the first part because we reuse it):

    CignaMedical = this.getField("CignaMedical").value;

    If (CignaMedical == '10') {}

    44.00 = Event.Value;

    } Else if (CignaMedical == "11") {}

    Event.Value = 82.00;

    } Else if (CignaMedical == '12') {}

    99.00 = Event.Value;

    }

    etc.

  • Dictionary stats help?

    DBA dear friends,

    In my 11.1.0.7 database, I have an ID of SQL which contributes about 100 reads physical Mil a day in the database, he ran 85 times in the 24 hour period.

    Here is the SQL - it accesses the SYSTEM tables and EM monitors query type, and is not a request part of the application-

    Dictionary collection stats help reduced the physical reads? Or any other point of view that what must be considered?

    Is it still worth to try tuning the query?  Please share your entries...

    SELECT 'AQ_Messages_in_Expired' t. *
    Of
    (select q. owner | | '.' | | q . name , v. expired
    de v$aq v, dba_queues q

    v. QID = q. QID and q. owner not in ('SYS','SYSTEM','WMSYS') and q. QID not in (206397, 206398, 206325)) t

    I don't see a MERGE JOIN CARTESIAN, which is good.  I do not see a stage for fixed table and it MIGHT help generate fixed objects statistics:

    exec dbms_stats.gather_fixed_objects_stats (null)

    You can see if they have been already generated by querying the SYS. TAB_STATS$:

    Select count (*) in the sys.tab_stats$;

    If it is empty then stats fixed objects have not been met.  Stats of $ service must be collected by the work of database statistics 'standard '.  You can collect these stats and run the query again to see if the run time is improving.  You can also check when the last statistics, what are the sample sizes and how closely NUM_ROWS agrees with a count (*) current tables questioned.

    David Fitzjarrell

  • If/Then statement to date null in Acrobat DC

    I work in Acrobat DC, I have a document which is 6 pages long, the first page is in English, the other in Spanish.

    I have two date fields, one is named AssessmentDate and the other is LongAssessDate. AssessmentDate displays the date in English in mm/dd/yy format on the first page.

    The LongAssessDate field converts the date in the field of the AssessmentDate in a Spanish format. For example if the Valuation Date
    24/05/15 then the date is converted to this format = 24 Mayo of 2015.

    Here is my code:

    oField var = this.getField ("AssessmentDate");

    oDateObject = util.scand ("mm/dd/yy", oField.valueAsString);

    Event.Value = util.printd ("date (es) {DD ' of 'MMMM' to ' YYYY}", oDateObject, true);

    What I found is, if the user does not have a date in the AssessmentDate field (they leave empty), the current date watch in the
    Field of LongAssessDate.

    I think I need an if/then statement for the LongAssessDate field. If the value of AssessmentDate is null or empty, then the LongAssessDate field must be null/empty, but don't know how to proceed. Any help is greatly appreciated.

    Thank you, Jamie

    This should work:

    var sDate = this.getField("AssessmentDate").valueAsString;

    If (sDate) {}

    oDateObject = util.scand ("mm/dd/yy", sDate);

    Event.Value = util.printd ("date (es) {DD ' of 'MMMM' to ' YYYY}", oDateObject, true);

    } else {}

    Event.Value = "";

    }

  • If/then statement

    I am designing a form that has 2 columns and I am looking for a script to fill a column based on data in the other.  Specifically, if classes has, B, C, D are entered in the column on the left, then the right column filled with 3 hours of credit.

    I took a fairly simple if/then statement... Found one in the help section of my software, plugged, named fields properly in the object palette and in the script.  No go.

    Book Terry JT not useful and my computer is not versed in Java.

    Or, maybe I'm doing it too hard and FormCalc would be the right choice?

    Thank you!

    Hi Milly,.

    You didn't say what else is in the grade or the opportunities that lay is A +, B-, etc. AND they are in a table row. I suppose they are in a table. I think on a drop-down list for the grade box. That said, this might work for a drop-down list box or a text field containing the grade (depending on how you have the menu drop-down set up) or this script is changed for a drop-down list containing the digital item values in the 'Connection' tab easily. It lends itself to the computer GPA (if it is an ultimate goal).

    Grade Credit
    A 3
    C 3
    F 0
    A 3

    The script is quite easy.

    Make sure you place this on the calculate of the "credit" field event AND formCalc is the language:

    ////////////////////////////

    If (rank< "f")     ="">

    $ = 3

    on the other

    $ = 0

    endif

    ////////////////////////////

    If there is + or - grades, you could use

    ////////////////////////////

    If (Substr (grade, 1, 1)<  "f")     ="">

    $ = 3

    on the other

    $ = 0

    endif

    ////////////////////////////

    La: Substr(grade,1,1) from the 1st letter of the slope and uses for comparison

    Replace with the name of your field of rank for the "rank" above and you should be good to go.

    Good luck

    Stephen

  • If - then statements (k)

    Honestly, I don't know how to write any PHP, but I don't know how to create a PHP website in Dreamweaver because DW wrote all the PHP for me.

    I think that I now need to get out a bit of Dreamweaver. What I would do is:
    If the variable width = 800, so I want to show a specific hidden layer.
    If the variable height = 800, so I want to show a specific hidden layer.

    I could do that in a second in ActionScript, but I have no idea how to go about this in Dreamweaver.

    How would one write an If - then statement?

    Don't forget, all this PHP code that creates DW is like hieroglyphics to me.

    Thank you
    -Kirk

    xparrot_dude wrote:
    > I'm not having much luck. I don't know where to put the if-then you have written or if
    > the $width is a standard PHP type thing or if it is a variable.

    It is a variable. In PHP all variables begin with a dollar sign.

    > Here's what I tried:
    >
    ><>
    > If ($width == 800) {}
    {$show > visible =}
    > {else}
    $show > = hidden
    > } ?>

    You would not assign a string to a variable in ActionScript without using
    quotes. It goes the same for PHP. In ActionScript, the semicolon at the end
    a statement is optional (but recommended recommended). In PHP, there
    mandatory.


    <>
    If ($width == 800) {}
    $show = 'visible' ;}
    else {}
    $show = 'hidden ';
    } ?>

    > I then put the $show variable in my css, like this:
    > #HorizontalPhoto {}
    > position: absolute;
    > left: 53px;
    > top: 159px;
    > width: 317px;
    > height: 172px;
    > z - index: 1;
    > visibility: $show;
    > }

    The only thing that can go in CSS is CSS. If you want to use PHP, you
    must surround yourself with PHP tags and use echo or print to the output of the
    the value of the variable.

    visibility: ;

    > Please keep in mind that I've never written ANY PHP. So I don't know if I
    > need the tags or even where I can and can not put code.

    Everyone is a beginner at one point, but you will get better help if you
    make an effort to begin to learn some PHP basics yourself. A good place
    to start is with the official PHP tutorial:

    http://docs.php.net/manual/en/getting-started.php

    You will also find the PHP language useful reference, especially if
    you are already familiar with ActionScript. The two languages share many
    in common:

    http://docs.php.net/manual/en/langref.php

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • I can't erase unnecessary files on my Mac Pro by pressing option, command, and then J.  Help, please.  Thank you

    I can't erase useless files more pressing option, command, and then J.  Help, please.  Thank you

    option, command, and then J is not listed as a shortcut KB

    here:

    Keyboard shortcuts in Mac - Apple Support

  • How to do an if then statement on a PDF form

    I'm doing an if then statement on a PDF form.

    The field is a field A * B = C.  If C < 10 then C = 10, of another C = A * B

    How can I write the Adobe Pro is on a PDF form?  I went into properties, the calculated field and nothing I've tried works.

    Each field is a separate object, so if you have 3 fields such as 'A', 'B' and 'C' are a single object has a unique value. Each field must be consulted individually, you should get the value in field "A" in a statement, the value of the field 'B' in another statement.

    var C = this.getField ('A') .value * this.getField("B").value;

    If (C)< 10="" )="" event.value="">

    else event.value = C;

    You can see more clearly with code like:

    var A = this.getField ('A') .value; the value of a field;

    var B = this.getField ('B') .value; the value of field B;

    var C = A * B; the field value has multiplied by the value of the field B;

    If (C)< 10="" )="">

    Event.Value = 10; the value is 10 when produced less than 10;

    } else {[]}

    Event.Value = C; another value is the product;

    }

  • If then statements

    Greetings,

    I use Adobe Acrobat Pro XI.  I have a drop down list which has the value 'Yes' or 'No' I would like to create an If Then statement to return specific values in another field of text based on the value of the drop-down list box.  Specifically, if the value of the 'drop-down list' = 'no', then the value of the "textfield2' will be 'n/a '.  If the value of the drop-down list is 'Yes', then the value of the "textfield2" remains empty if the applicant can enter data into "textfield2.

    Hope it makes sense.  Thank you in advance.

    Steve

    Use this code in the script validation custom from the drop-down list:

    If (event.value == "No") this.getField("textfield2").value = "n/a";

    else this.getField("textfield2").value = "";

    Make sure that check the option to validate the value selected from the drop-down list immediately (under Properties - Options).

  • If then statement - hide the field 0 and counting! Help!

    OK, I try to have the Cap RATE: to do a number of things. On the side of first note, in the Privileged Postion there drop down there has 4 options, 1 fixed, 2 ch, HELOC 1st and 2nd HELOC. I'm figuring the CEILING using the APOR , if the Position of privilege claims fixed 1st or 2nd set only. So that the calculation of the ceiling RATE should read something like this, IF (States ofPrivilège Position : Fixed 1st or 2nd set then ADD (fixed 1 IF add 1.5% IF the 2nd ch ADD 3.5%) rate APOR (users will enter rate APOR).)

    EXAMPLE:

    Position of privilege: 1st set

    APOR: 3.48%

    (because it is the 1st ch)

    + 1.5%

    CAPP RATE = 4.98%

    EXAMPLE 2:

    Position of privilege: 2nd set

    APOR: 3.48%

    (because it is the 2nd ch)

    + 3.5%

    CAPP RATE = 6.98%

    Also, I want the CEILING to be TRANSPARENT or WHITE if there is no rate entered MRPS because it's to RATE FIXED ONLY.

    Capture.JPG

    Any help is greatly appreciated!

    Ok

    This can be done easily with a FormCalc script in the calculate the rate ceiling field event.

    Assuming that the other fields are named LienPostion and MRPS, the script looks like:

    if (LienPosition eq "1st Fixed") then
              APOR + 1.5
    elseif (LienPosition eq "2nd Fixed") then
              APOR + 3.5
    else
              APOR
    endif
    
  • I need help with Java Script if/then statement

    I have absolutily no experience writing Java Script any help at all would be appreciated.

    I am working on a form in which I need a box for the person filling out the form click if they are a company be exempt from taxes. Well, obviously when they check the box I need field sales tax to change $ 0.00 total cost will only be calculated on the price of the items.

    Currently I use steps in the field of calculation for my Salestax.

    var k = this.getField ("SubTotal");

    K.value = Event.Value * 0.0825;

    Yet once, all possible assistance would be greatly appreciated.

    Tiffany

    Let's say the name of the box is "IsTaxExempt". Then you can use this code as the field of Salestax calcluation:

    If (this.getField("IsTaxExempt").value == "Off") {}

    var k = this.getField ("SubTotal");

    K.value = Event.Value * 0.0825;

    } else event.value = 0;

  • using nest if then statements using ABM

    I have a two input, 1 output circuit, as in the attached schema. My third node is set down by the very high resistance voltmeter. What I have is a user defined current source ABM that depends on other parameters in the circuit. I wonder it is what my conditional statement is entered in the right format? Conditions are particularly complex and describe as follows:

    If the voltage difference between V2 and U1 is greater than 0, then the current in the ABM = 10 ^-12

    If this voltage difference that the above is not greater than zero and if (V (1) u (1))<(V(2)-U(1)), then="" the="" abm="" current="" is="">

    Otherwise, if (V (1) u (1)) > = (V (2) u (1)) then the current is (0.1*((-(V(2)-U(1)))^0.35))*0.00001596*(((V(2)-U(1))^2)/2)

    As you can see, they are very complex conditions and my concern is that I can't just type in U1 and get the compiler to understand I want the voltage read on the voltmeter of bottom-node. I think I'm using the correct nesting in the encoding format is: if (T, X, (if(Q,R,S))).

    Any help would be appreciated, and details can be provided.

    I don't know why its not throwing an error for the use of u (1), maybe it's a valid keyword.

    If you want to reference a voltage properly, it should be V (net_name) for single ended voltages (referenced to ground) or V (net1, net2) for differential voltages... For models ABM I suggest turning on net visibility throughout the schematic so that you know the net name to the positive terminal of U1 or anywhere else for that matter.

    I think the syntax you have to if/then/else is correct otherwise.

    Kind regards
    Pat Noonan
    National Instruments

  • Explorer.exe hangs up, have to end task, and then restart help!

    I am running XP, incidentally. It will hang, that the fan is working hard, and I have to end task to exit, and then add it to the. What is going on? Any ideas? Thanks in advance!

    Hi KatinaHollman,

    1. did you of recent changes on the computer?

    2. you receive an error message?

    3. do you have security software installed on the computer?

    4. when exactly the Windows Explorer crashes on the computer?

    Method 1

    Refer to the article below and try the steps mentioned, check if it helps.

    FIX: The Explorer.exe process stops responding (hangs) when you use Windows Explorer that hosts a shell that has been created using MFC extension

    http://support.Microsoft.com/kb/972685

    Method 2

    If the previous step fails, then check if the problem persists in the safe mode and after return with the result.

    A description of the options to start in Windows XP Mode

    http://support.Microsoft.com/kb/315222

    Method 3

    If the problem does not persist in safe mode, then it is possible that some third-party programs installed on the computer is causing the problem.

    I suggest that you put the computer in a clean boot state and check if it helps.

    To help resolve the error and other messages, you can start Windows XP by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    See section to learn more about how to clean boot.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Reset the computer to start as usual

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    (a) click Start, type msconfig in the search box and press ENTER.

    (b) If you are prompted for an administrator password or for confirmation, type your password or click on continue.

    (c) under the general tab, click the Normal startup option, and then click OK.

    (d) when you are prompted to restart the computer, click on restart.

  • SQL statement Help Find County

    I have an Oracle table with lot of columns and I want to check if 3 of my columns contain all values (I don't like the real value, there, I just want to know how many of them have a value). Allows so say for example:

    Table columns: ID, A, B, C

    These conditions would be true... value exists in both A AND B, A AND C or B AND C columns. If a value exists in A and not B or C, then it should not be counted. Similarly, if a value exists in B and not A or C, or there is a value C and not A or B, then he shouldn't have counted.

    ----------------------
    | ID | A | B | C |
    ----------------------
    | 1. X | X | | <-true
    | 1. X | X | X | <-true
    | 1. X | | X | <-true
    | 1 | | X | X | <-true
    | 1. X | | | <-false
    | 1 | | X | | <-false
    | 1 | | | X | <-false
    | 1 | | | | <-false
    | 2. X | X | | <-true
    | 2. X | X | X | <-true
    | 2. X | | X | <-true
    | 2 | | X | X | <-true
    | 2. X | | | <-false
    | 2 | | X | | <-false
    | 2 | | | X | <-false
    | 2 | | | | <-false
    ----------------------

    Static values will be my ID. I want to check against 2 ID who I know will always be the case. I tried to write, but I'm sure I'm doing something wrong because my count was very high (about 1.7 million records over 2 million).

    That's what I wrote:

    Select count (*)
    FROM table1
    where (ID = "1" or ID = "2")
    (A is not null and B is not null)
    or (A is not null and is not null)
    or (B is not null and is not null);

    Thanks for your help!

    Published by: 973560 on March 14, 2013 12:03

    Hello

    One way to see how many rows have values in at least 2 of the following columns:

    SELECT  COUNT (*)     AS cnt
    FROM     table1
    WHERE     id     IN ('1', '2')     -- is id really a string?
    AND     NVL2 (a, 1, 0)
          + NVL2 (b, 1, 0)
          + NVL2 (c, 1, 0) >= 2
    ;
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    Point where the above query is to produce erroneous results, and explain, using specific examples, how you get the right results from data provided in the palces.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

Maybe you are looking for

  • Problem with the video playback PC on Toshiba 43PH46P projection TV

    Hello first sorry for my English, but I hope you understand most ;) Currently, I'm trying to connect my Projection TV with my PC.Model: Toshiba Projection color TV 43Ph46P Because the doesn´t TV have a VGA-Plugin, I made a connection to my Pc with an

  • WANT 4520: Team climbing ISB

    Hello I am trying to solve an exchange of cartridge printer with the ISB climbing team.  I returned 3 black cartridges and 3 60XL and was told in an email I'd be receove 4 63XL color and black cartridges in return.  I got 1 of each and had assured th

  • iPhone 5 touch of ghost / problem uncontrollable touch

    Recently, I dropped my iPhone 5 and the screen and broken LCD screen. The next day, I set myself and I got the phone back off. I went home and plugged into iTunes and fixed, it is disabled. No problem to reach at this stage. The next day my phone was

  • P7-1414 OFFICE: MISSING FILE (MSVBVM50. (DLL)

    MY COMPUTER IS A FILE MISSING (MSVBVM50. (DLL), HOW I CAN GET IT.

  • NI4350 (PCMCIA) and NI DAQ (traditional)

    I'm trying to get a NI4350 to work with VC ++. I downloaded and installed NI435X252, which is supposed to be specific to this device. When I use the Group MAX, the device appears and test panel shows that temperatures are read, if the equipment is op