Conditional formula based on several Checkbox?

WARNING: Newbie here and appreciate your patience...

Writing a custom calculation based on 2 boxes (CleanOverride and AdvRentDeposit). I could go on this all wrong, but these boxes currently / hide a calculated value or user submitted value. The calculation below aims at showing the finals owed (Total - varying from deposits advanced). Here's where I landed, but no luck... any help is much appreciatated!

(function () {}

var v1 is getField("TotalDue").value - getField("Security_Deposit").value - getField("Pet_Deposit").value - getField("AdvRent").value - getField("AssAppFee").value.;

var v2 is getField("TotalDue").value - getField("Security_Deposit").value - getField("Pet_Deposit").value - getField("AdvRentAlt").value - getField("AssAppFee").value.;

var v3 is getField("TotalDueAlt").value - getField("Security_Deposit").value - getField("Pet_Deposit").value - getField("AdvRent").value - getField("AssAppFee").value.;

var v4 is getField("TotalDueAlt").value - getField("Security_Deposit").value - getField("Pet_Deposit").value - getField("AdvRentAlt").value - getField("AssAppFee").value.;

If ((getField("CleanOverride").value! == 'On') & & (getField("AdvRentDeposit").value! == 'On')) {}

Event.Value = v4;

} else if ((getField("CleanOverride").value! == 'On') & & (getField("AdvRentDeposit").value! == 'Off')) {}

Event.Value = v3;

} else if ((getField("CleanOverride").value! == 'Off') & & (getField("AdvRentDeposit").value! == 'On')) {}

V2 = Event.Value;

} else if ((getField("CleanOverride").value! == 'Off') & & (getField("AdvRentDeposit").value! == 'Off')) {}

Event.Value = v1;

} else {}

Event.Value = "error";

}

})();

The values are not correct. I dropped it and went to another way to check the boxes and it works now. Here is the final calculation for reference:

var x = this.getField ("AdvRentDeposit");

var y = this.getField("CleanOverride");

If (x.isBoxChecked (0))

var x = getField("Rent").value - getField("AdvRentAlt").value;

on the other

var x = getField("Rent").value - getField("AdvRent").value;

If (y.isBoxChecked (0))

var y = getField("HideClean").value + getField("StateTaxCleanAlt").value + getField("CtyTaxCleanAlt").value;

on the other

var y = getField("CleaningFee").value + getField("StateTaxClean").value + getField("CtyTaxClean").value;

Event.value = x + y + getField("StateTaxRent").value + getField("CtyTaxRent").value

Tags: Acrobat

Similar Questions

  • Conditional formula using one of the two operations

    How to create a conditional formula where the results are a choice between two formulas based on the cell to two cells has a value greater than 0?  More specifically, I have to add value in a cell (in the column headed "added amount") to a cell in a column of the running totals if the value of this cell is greater than 0, or subtract the value of a different cell (in the column headed "amount withdrawn") in the same line, if the value of this cell is greater than 0.  Only one of the two will have a value in a given line.

    Hi George,.

    If you only have a value in a column, then you have even a logical formula. You can do this:

    A2 is an input value, it could be called "balance forward".

    A3 is filled down.

    Quinn

  • Conditional routing based on user or node access group

    We have a requirement to send a DRG application to a specific approver based on the issuing user or group access to the node of the issuer.  Is it possible to refer to the Group of access user or node in a formula derived from property or the validation that I could use in conditional routing in 11.1.2.4?

    I recently discovered the function UserName().  I have built a hierarchy of users DRG and can use the function UserName() to tie in to the values to use in a conditional routing based on the current user.

  • Search based on several boxes

    Hi, I have a form where the user can select several checkboxes (i.e. 'interests of the boxes' = ski, hiking, Cliff jump etc etc)

    Here is my code:

    < CFQUERY NAME = "GetAdvancedSearchResults" datasource = "" #Application.dSource # "DBTYPE ="ODBC">"
    SELECT *.
    TABLE
    WHERE ID = #Session.ID #.
    AND the country AS ' #Form.country # '.
    AND stateprovince LIKE ' #Form.stateprovince # '.
    AND LIKE interests? (one or more check boxes are checked)
    < / cfquery >

    How to check the values of several selections of the box and select all what it of my database based on all the boxes ticked? I guess I need to create a table of ListAppend or something in the SQL statement?

    Any help would be great!

    Jeremy

    > I'll put a VAR "NumberOfRecords" to make sure that my
    > check boxes are displayed only 3 per line in my painting.

    As mentioned Azadi you don't need the variable 'NumberOfRecord '. Use a combination of 'CurrentRow' and MOD

    ===============================================


    do something here


    ===============================================

    > Why can I not use the statement 'IN'?

    On the one hand you are mixing examples so the final sql is bad. Look at the example of Azadi. Notice that there is no cfloop? And note the quotation marks and no # sign in education IsDefined().

    >>
    > AND interests
    >> (
    >>
    > value = "" #form.interest_checkboxes # ">"
    >> )
    >>

    > I tried your latest code and I get this error:
    > My table is no longer uses TEXT or nTEXT

    Well the error message show 'interest' type is TEXT or nTEXT column.

    But you might have a more serious problem. By chance the 'interests' column does contain a list delimited values such as 'sports, cars, beer' or '22,18,36 '? If so I suggest strongly redraw you and standardize

    http://www.ServerWatch.com/tutorials/article.php/1549781
    http://dev.MySQL.com/tech-resources/articles/intro-to-normalization.html

    If you're new to SQL, you must consider a few tutorials sql to familiarize yourself with the basic example query operators IN, LIKE, OR, etc.
    http://www.w3schools.com/SQL/default.asp

  • several checkbox in horizontalfieldmanager problem!

    Hi, I add several checkbox in horizontal fieldmanager.

    It displays as intended for os 5 and less but only displays the first box added to os 6.

    I don't know what the problem is! Please tell me what I'm doing wrong, or give me a work-around!

    Code:

    check1 = new CheckboxField("1", true);
    check2 = new CheckboxField("2", true);
    check3 = new CheckboxField("3", true);
    
    checkField = new HorizontalFieldManager();
    
    checkField.add(check1);
    checkField.add(check2);
    checkField.add(check3);
    
    add(checkField);
    

    Thanks in advance!

    It seems that in CheckboxField became "width-hungry" the OS 6.  Check this thread for the solution:

    CheckboxField, on the same line with OS6

  • Conditional formula?

    I have a financial report that allows users to choose an account and display the values of all products for this specific account. At the bottom of the form is a line called Total formula. Some accounts must be added into the total. Some accounts must be averaged.

    Is it possible to create a "conditional formula" using IfThen? I was thinking something in the sense of the following:

    IfThen (MemberName(Grid1,A,Account) = GRSALES, sum([1]), avg([1]))

    But something tells me that this is not the correct syntax. Can anyone help?

    If I remember correctly, IfThen works only on the figures. What you are trying to accomplish is to check if the member name is GRSALES which does not work

    One way to do it is to have two rows. with the AMOUNT and the other with AVG and apply a conditional format to hide / display according to the your criteria such as GRSALES

    Hope that helps

    Concerning

    Amarnath

    ORACLE | Essbase

  • column of formulas based on a sql statement

    Hi all

    I have a select statement:

    (select sum(t.CR_AMOUNT-t.DR_AMOUNT)
            from HOSPITAL_TRANSACTIONS_VIEW t
            where t.TRX_TYPE in ( 'CR','DR')
            and   t.CUSTOMER_NO = :account_no        -- where (:account_no) is a char column in a non-database block 
            and   t.trx_date between '01-03-2014' and '31-03-2014') ;
    
    

    and I want to create a column of formulas based on that, but I do not know how?

    Thanks in advance

    I don't see why you need a column of formulas to do this, as one element of forms is involved. But if you want to use a column formula:

    1. create a function local on your form name so maybe FK_FORMULA, col of the: account_no as IN-variable to this function. Inside your sql function and return the result as the result of the function.

    2. in the formula field, simply call the function as FK_FORMULA (: account_no)

  • I used him copy / paste to add several checkboxes on my form, but now in preview mode when I check the first box it automatically checks all the boxes.  How can I stop this from happening?

    I used him copy / paste to add several checkboxes on my form, but now in preview mode when I check the first box it automatically checks all the boxes.  How can I stop this from happening?

    For later use, it happened because your fields have the same field name, and fields with the same name automatically have the same value.

    So all you had to do was so each had a unique name and it would have worked, but using the command create several fields is preferable because it renames the fields for rename you them.

  • effect based on several keys at once

    effect based on several keys at once

    Hello everyone, I develop an interface and I need several buttons have to be pressed at the same time

    The buttons are divided into sections, each section is in a HBox.

    I need a button for each section with effect remains to be pressed... I don't know how.

    I tried to put them door effect but obviously losing the effect when I press another button.

    I have five sections: section mapping, lighting section, motion of the section, section grids and symbology section. In each of them, you have to press a button

    Joint is a photo so they can get a better idea of what I need

    In advance thank you very much.

    Sorry for the bad English


    http://img119.imagenar.com/119/411d7e59/616c3fbc/GUI-GIS.PNG

    biochemistry43 wrote:
    And I can handle these tooglegroups with css. The interface I'm FXML

    The ToggleGroup defines the sets of buttons are mutually exclusive: one button within a group can be selected.

    You can set the FXML ToggleGroups (see http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#define_elements). They are not visual components, just logical groupings toggle or radio buttons, sort of css does not really apply.

    Not sure, but I think you have to toggle-buttons press them again to turn them off or not?

    Yes, turn the buttons turns on with a single click and then on the road again with another click. (The selected state is "activated" by clicking.) If the button toggle is part of a group of rocker, when you select all the other boxes of the rocking group be deselected.

    But I may have misunderstood what you are trying to do...? I'm not sure.

  • Textarea conditional display based on the value of the checkbox.

    Hi all

    I have a question regarding the conditional display of an article based on the value of the checkbox.

    I have a checkbox in a region, which is a STATIC LOV:; Y and the text box in the same region. Now I want to show this textarea only if the check box is selected. ??

    Please suggest how to achieve this.

    Thank you

    DC

    Hello

    I guess that you are 4.2 Apex as you haven't shared the same.

    • Create a dynamic Action on change of box which should present the value of the checkbox and update the TextArea element.
    • Then continue as conditional Textarea with checkbox value.

    BR,

    Patrick

  • Adding conditional based on the checkbox

    I have a field that adds the values of several other fields in the form.  The question I have is how can I add another 2 If a certain checkbox is visible and active?

    Hello

    You would need an if/else statement that looks at the value of the checkbox.

    This could be in the event to calculate the field which displays the answer:

    var tempAnswer = numericfield1.rawValue + numericfield2.rawValue + numericfield3.rawValue;
    
    if (checkbox.presence == "visible" && checkbox.rawValue == 1)
    {
         tempAnswer = tempAnswer + numericfield4.rawValue + numericfield5.rawValue;
    }
    
    this.rawValue = tempAnswer;
    

    You would need to change the object references, etc, but it should give you a structure to work with. We have examples here, some of which include objects with calculation scripts: http://assure.ly/eEPuCM

    Hope that helps,

    Niall

  • Definition of ethnicity to group a rec per person based on several conditions

    Hello

    The final results will be used in a report and the table. A new category for ethnicity has been added to the database.
    For this reason, the field that we use to report is no longer available. I've implemented a query
    identify a record per person for ethnicity codes. The rules are if the person has a record ID as
    Hispanic who use little matter that they have more than one record. If the person is Hispanic,
    Then identify which category they are. If they have only a record (or multiple records in the same category),
    Code for the main category. If they have more than one record in all categories (except Hispanic), then count
    them as multi-ethnic.

    Because the table is large and is joined with other tables for the various reports, I would like to know
    If there is a way more efficient and parallel to write the sql statement. In addition, for the future, they
    intend to request a report that will decompose the multiethnic in different categories to display a chart.
    I thought that I would need pivot 'horizontally', or could happen "vertically," the way that the
    underlying table is.

    In the sample data:
    1st person has two records Hispanic and European; count under "Hispanic."
    2nd person has two white records and Western Europe; count as 'White '.
    3rd person has two records Indian and African; count under "multiethnic".
    4th person has a record of the Sioux; count under "American Indian or Alaska Native".


    Here is a table of sample data:
    CREATE TABLE ETHTEK
    (
      ID             VARCHAR2(5 CHAR),
      ETHCODE        VARCHAR2(1 CHAR),
      ETHGROUP_CODE  VARCHAR2(3 CHAR),
      ETHGROUP       VARCHAR2(30 CHAR)
    );
    
    INSERT INTO ETHTEK
    (ID, ETHCODE, ETHGROUP_CODE, ETHGROUP)
    Values
    ('11111', '5' ,'SEU', 'Southern European');
    INSERT INTO ETHTEK
    (ID, ETHCODE, ETHGROUP_CODE, ETHGROUP)
    Values
    ('11111', 'H', 'SAM', 'South American');
    INSERT INTO ETHTEK
    (ID, ETHCODE, ETHGROUP_CODE, ETHGROUP)
    Values
    ('11121', '5', 'WEU', 'Western European');
    INSERT INTO ETHTEK
    (ID, ETHCODE, ETHGROUP_CODE, ETHGROUP)
    Values
    ('11121', '5', '5', 'White');
    INSERT INTO ETHTEK
    (ID, ETHCODE, ETHGROUP_CODE, ETHGROUP)
    Values
    ('11122', '3', 'AF', 'African');
    INSERT INTO ETHTEK
    (ID, ETHCODE, ETHGROUP_CODE, ETHGROUP)
    Values
    ('11122', '2', 'IND', 'Indian');
    INSERT INTO ETHTEK
    (ID, ETHCODE, ETHGROUP_CODE, ETHGROUP)
    Values
    ('11159', '1', 'SIO', 'SIOUX');
    Note: for do not need to create another table, I've hardcoded the translation of the description in the box instructions
    in the following query. The actual query uses a lookup table.

    Here's the sql code: (for some reason, in my preview, the upper/lower that the symbols are not, so put a comment on the lines that should be not equal in case they don't show up when posting)
    WITH e AS                                                       --Ethnicity
            (SELECT DISTINCT id,
                             ethcode, 
                             ethgroup_code
                             ethgroup
                        FROM ethtek
            ),
            h AS                                                        --Hispanic
            (SELECT id, ethcode
               FROM e
              WHERE ethcode = 'H'),
            nhm AS                                  --Non Hispanic or Multi Ethnic
            (SELECT DISTINCT id, ethcode
                        FROM e
                       WHERE ethcode <> 'H'),             -- Not Equal 'H'
            nh AS                                                   --Non Hispanic
            (SELECT id,
                    CASE
                       WHEN COUNT (*) OVER (PARTITION BY id) >
                                                                 1
                          THEN 'M'
                       ELSE ethcode
                    END AS ethcode
               FROM nhm
              WHERE ethcode <> 'H')                     -- Not Equal 'H'
       SELECT id, ethcode,
              CASE
                 WHEN ethcode = 'H'
                    THEN 'Hispanic or Latino'
                 WHEN ethcode = '5'
                    THEN 'White'
                 WHEN ethcode = 'M'
                    THEN 'Multi-Ethnic'
                 WHEN ethcode = '1'
                    THEN 'American Indian or Alaskan Native'
                 ELSE ethcode
              END AS ethnic_desc,
              CASE
                 WHEN ethcode = 'H'
                    THEN '4'
                 WHEN ethcode = '4'
                    THEN '5'
                 WHEN ethcode = '5'
                    THEN '6'
                 ELSE ethcode
              END AS old_ethnicity_code
         FROM (SELECT DISTINCT h.*
                          FROM h
               UNION
               SELECT DISTINCT nh.*
                          FROM nh LEFT OUTER JOIN h ON nh.id =
                                                                      h.id
                         WHERE h.id IS NULL) eth;
    What is the result of the query:
    Row#     ID     ETHCODE     ETHNIC_DESC     OLD_ETHNICITY_CODE
    1     11111     H     Hispanic or Latino               4
    2     11121     5     White                         6
    3     11122     M     Multi-Ethnic                    M
    4     11159     1     American Indian or Alaskan Native     1
    Thus, on 7 disks, we only have 4 people once.

    This is the result of summary query (not included):
         Group               Total
    American Indian/Alaskan Native     1
    Hispanic               1
    White                    1
    Multi-Ethnic               1
    Total                    4

    Hello

    Thanks for posting the CREATE TABLE and INSERT.
    The main reason for this is to allow people who want to help you recreate the problem and test their ideas. If you post statements that don't work, it defeats the purpose.
    Please check all the code before you post. Each of the INSERT statements has a lack of parentheses or quotation (usually two).

    If you have a parent-child relationship within the gorrace; some lines are parents of other lines, and you want the children to inherit traits from their parents.
    What you posted is the usual way to the relational database for handling that: a self-join. I don't see any obvious ways to make the self-join more quickly.
    You can avoid the self-join in your query if you are willing (and able) to denormalize the table and copy the traits inherited from their parents to their children. This looks like the kind of table that won't change very often, in order to maintain the standard table shouldn't be a big project. However, if the table has only 56 lines, so whatever you do with it, maybe not a great impact on the overall performance of the query.

    If you want to improve performance, a more scientifically to go about this is to know what that bottlenecks in the existing query and remedy.
    See these discussions on how to report a tuning issue:
    When your query takes too long...
    HOW to: Validate a query of SQL statement tuning - model showing
    Then start a new thread, setting just about the request.

  • Conditional formatting based on another column

    I created a conditional format in several columns, all based in a column: "Format Type". In a table view, the conditional formatting works very well for the metrics. For a text column, the conditional formatting only works if the column 'Type of formatting' appears on his left.
    Is this right? I don't remember having a similar problem with 10 OBIEE.
    Now I use OBIEE 11.1.5

    Thank you.

    Bug 12772993 is listed under the 11.1.1.6 fixed

    Hope this helps,
    Scott

  • Conditional formatting based on the other content of the cell

    Hello

    I watched tutorials and read other messages of conditional formatting. What I'm trying to do doesn't seem like it should be too difficult, but I can't it to work.

    I created a spreadsheet of travel and I would that my cells spend every day to highlight when I went on the budget (budget in another table on another sheet)

    My conditional formatting looks like this

    Who works for the first cell that I put it to the top for the table. If I try to drag the rules to the bottom of the table, or highlight the entire table and and my rule number 1 shows what

    and of course, it will not highlight.

    This is an excerpt from the table, on that I try to apply highlighting

    And that is the picture that source information.

    I use a macbook pro under OS X El Capitan 10.11.1 and numbers 3.6.1 (2566)

    Thanks in advance for any help!

    Hello

    It's looks you're new to spreadsheets... you must add a dollar sign in front of "The rest of the budget per day" (your 1st image), or check the 2 boxes like this:

    To understand: http://www.notjustnumbers.co.uk/2011/05/excel-tip-dollar-sign-in-formula-fixing. html

    See you soon

    James

  • Conditional formula node

    Hi guys

    I wrote a conditional code simple node formula and there is no error, but it is not calculated. It fails and when I check the code I can find no error. Please read my code and I would like to know what is the problem with my code.

    Thank you very much

    theres no error, but you used for example "if (A = 0). = is NOT a comparison operator, I think you mean "if (A == 0)" which has zero...

    Try it like this...

    Hope this helps

    Christian

Maybe you are looking for