Set the value of a variable using a conditional, on a sliding scale?

Basically what I'm doing, is assign the variable "supplement" a number of base on the Variable 'numberOfSheets '. The only problem is that I need to assign a different variable for each leaf up to 6,000. All about 6000 will have the same variable.

Someone has any idea how to write something like this, without having to show the sources individually each sheet?

Here's an example of my code...

function calculateUpCharge (): void {}

{if (numberOfSheets = 1)}

upCharge = number (20);

}

ElseIf (numberOfSheets = 2) {}

upCharge = number (19.5);

}

ElseIf (numberOfSheets = 3) {}

upCharge = number (19);

}

ElseIf (numberOfSheets = 4) {}

upCharge = number (18.5);

}

ElseIf (numberOfSheets = 5) {}

upCharge = number (18);

}}

What is a linear function?  If so, use:

var m:Number;

var b:Number;

paramF (6000,2,1,20);

function calculateUpCharge (): void {}

upCharge = m * numberOfSheets + b

upCharge = Math.max (upCharge, m * 6000 + b;)

}

function paramF(x1:Number,y1:Number,x2:Number,y2:Number):void {}

m =(Y1-Y2) /(x1-x2);

b = y1 - m * x 1;

}

Tags: Adobe Animate

Similar Questions

  • How to set the value of a variable in automator?

    I'm totally new to automator I found a post that I try to reuse

    to Re: copy multiple files from TextEdit in one Word file

    I want to open a series of html files in a folder and convert in a TextEdit rtf file.

    However, I am unable to automator find out how set the value of a variable such that it appears in this post

    I looked at every command in library without a lot of fortune

    Any help?

    Thank you

    Dan

    Its in Utilities.

    In Automator, use the search box:

  • How the value for several variables using a single guest

    Is there a way to put more than one variable with a single guest?
    for example, the value @CurrentYear and @PasteYear using just a single guest for @CurrentYear.

    A clue?

    Thank you

    Luke

    Using variables to repository you can set like this.
    Check this link http://gerardnico.com/wiki/dat/obiee/set_variable

    If brand pls help

  • problem by setting the value of a variable substitution in a calc script

    Hi all.


    I'm trying to update the value of a variable substitution inside an IF statement, and I have a problem.

    Here is the code:


    * "Jan" (*) "
    IF (LoopCounter = 1) & varEntity = "100";
    ENDIF ;)

    the error that I get back from Regional service is:

    Error: 1200336 error analysis [Jan] (line 54) formula: [()] without [)]

    It's tricky. Without really analyzing the details of your example, two options that might be worth a visit:

    1. write a MaxL script for updating the subvar (s), and then run the calc, x 20. 40 lines of MaxL and 500 lines of code is 10 000. Obviously, this only works if the launch of the MaxL script is feasible, and you know that you aren't going to have multiple instances of the calc (or any what calc which depends on these subvars) running at the same time. But I guess you're OK with the last part, because even your original solution would have this problem
    2 hyperion Business Rules

    I know that CL knows a lot of HBR, if he is here today...

  • How to set the value of a variable in a cluster in LabVIEW to c#?

    Hi guys, I'm working on a small c# program, which by using the interface provided by LabVIEW.  And I know that, with the help of lv. SetControlValue (name, value) can set a variable just on the front panel. But in my case, there are several groups on the front panel. Then it confused me how to set the variables in these groups. For example, there is a cluster named clusterA and a variable named a., I tried something like this:

    lv.SetControlValue("clusterA.valueA",1);
    

    but it totally inoperable. Everyone has some experience with this sort of thing? Thank you very much!!

    Hey guys, thanks a lot for all your response. I just found a simple way to solve this problem. For example, there is a cluster named "ClusterA", and there are only two witnesses, who are: an int value named "IntA" (default = 10 IntA value) and a string value named "StringA" (by default the StringA = 'abc'). In c#, if you call the method:

    var clusterA is vi (Array). GetControlValue ("ClusterA");

    you will get a table looks like: clusterA = {10, 'abc'}; So if you want to change IntA 123, you simply do:

    clusterA.SetValue (123, 0); 123 the value, 0 is the index of IntA in clusterA, after this clusterA table = {123, 'abc'}

    After that, simply to make the table in LabVIEW using:

    VI. SetControlValue ("ClusterA", clusterA);

    and now you see the LabVIEW, IntA is changed.

  • Is it possible to use advanced actions to set the value of the question?

    Hi - I am trying to develop a course of Captivate 4 and wish I could on slide enter advanced use of actions to check the value of a user variable, and if the variable is equal to x then set the value of the question (correct) 1. Is there a system variable, that I can use to define?

    This course is to download a package to an LMS (Moodle) SCORM.

    Ideas/suggestions would be greatly appreciated.

    Unfortunately, Captivate is not currently a way to manipulate SCORM score via advanced Actions and the user or System Variables.

    So that you could have OnSlideEnter check and set the value of a variable, you don't have a way to use this information to force sending a question slide.

  • How to assign the value of a variable to a quiz?

    Hi, I have a problem, I attempted to set the value of a variable for the quiz on the final value of the project, any suggestions?

    Sorry but I do not understand your question at all. If you talk about a quiz like cpQuizInfoPointsscored or cpInfoPercentage system variable, this is all simply impossible because the system variables are read-only.

  • Set the values in cascade LOV (Skillbuilders SuperLOV used)

    Hello

    I install a simple page with a SuperLOV cascading.

    I'm trying to set the values of the first and the second SuperLOV based on the selection of a report.

    After the selection, a javascript function is called that sets the variable state and browser session P1_EMPNO

    function editRecord(pValue) {
       //set session state of P1_EMPNO to use in pl/sql query
       var a=new htmldb_Get();
       a.add('P1_EMPNO', pValue);
       var r=a.get();
    
       //set variable to trigger dynamic action
       $s('P1_EMPNO',pValue);
    }
    

    I use this point (P1_ITEM) to trigger a dynamic Action (when the value changes AND is not null) to SET the VALUE for the first LOV. This method works.

    Then one created a second dynamic Action that uses the event AFTER REFRESH for the first LOV to SET the VALUE for the second SuperLOV. It does not work

    Just to test the logic, I created a third standard LOV which is the same as the second SuperLOV and respective dynamic action. This one works.

    It's the http://apex.oracle.com/pls/apex/f?p=49044:1 application

    (PATRICK, demoadmin, 1234) application WORDERS.

    I would be very grateful for any help

    Thank you.

    OK, I discovered what was going on.

    I used a $('#P1_EMP').apex_super_lov of javascript for dynamic Action action to set the value of the SuperLOV.

  • How to set the value of the point of application using pl/sql in the application process

    Hi guys,.

    I want a global variable (application point) whose value will be set to start when a user logs on to the application. The value will be retrieved from the database by using a sql query. I don't exactly know the syntax to set the value of the point of application in the application process. Also, I want to know what type of enforcement process should I use to set the value of the point of application, when a user starts a session. The value of the point of application varies from one user to the user.

    Help, please.

    I use apex 4.2

    Kind regards

    Waqas

    You can use the application element as a link with his name. That is to say. your point of application is named G_MY_APPLICATION_ITEM, then you can / set of access using: G_MY_APPLICATION_ITEM.

    For example

    BEGIN

    -assign as a variable

    : G_MY_APPLICATION_ITEM: = 'LARRY ';

    --

    -use in a SQL statement

    SELECT WHATEVER_COLUMN

    IN: G_MY_APPLICATION_ITEM

    FROM MY_TABLE

    WHERE USERNAME =: APP_USER

    ;

    END;

    Peter

  • Update process variable (XML) to help set the value

    Hello

    I'm having a problem to update the value in the variable XML using SetValue (by the XPATH expression). It is removing my original XML and replacing it with a new one. I'm off clue why this happens.

    My steps:
    1. I created a variable of XML type and set it as a STARTER, REQUIRED.

    xmlData.jpg

    2. I am updating this variable using the activity set the value. In my process, it is "locUpdate1".

    setVal.jpg

    The original XML is: (xmlData value)

    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:dd="http://ns.adobe.com/data-description/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" timeStamp="2011-01-03T07:31:26Z" uuid="009257fd-3f66-449d-b554-6a095f917b74">
    <xfa:datasets>
            <xfa:data>
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1/>
                            <UserName1/>
                            <UserID2/>
                            <UserName2/>
                            <UserID3/>
                            <UserName3/>
                            <CurrentUserID>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</CurrentUserID>
                            <CurrentUserName>Sarah Rose</CurrentUserName>
                        </UserInfo>
                    </applicantInformation>
                    <FSTARGETURL_/>
                </GetUserRoot>
            </xfa:data>
            <dd:dataDescription dd:name="GetUserRoot">
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1/>
                            <UserName1/>
                            <UserID2/>
                            <UserName2/>
                            <UserID3/>
                            <UserName3/>
                            <CurrentUserName/>
                            <CurrentUserID/>
                        </UserInfo>
                    </applicantInformation>
                </GetUserRoot>
            </dd:dataDescription>
        </xfa:datasets>
    <pdf xmlns="http://ns.adobe.com/xdp/pdf/" href="-4608764380271080676-28"/>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
            <annots/>
        </xfdf>
    </xdp:xdp>

    After operating, it evolves to

    <GetUserRoot>
        <applicantInformation>
            <UserInfo/>
        </applicantInformation>
    </GetUserRoot>
    
    

    should not be done.

    I want to just copy the value of the an element in the other.

    /process_data/xmlData/GetUserRoot/applicantInformation/UserInfo/UserID1 = /process_data/xmlData/GetUserRoot/applicantInformation/UserInfo/CurrentUserID
    
    

    Output should be:

    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:dd="http://ns.adobe.com/data-description/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" timeStamp="2011-01-03T07:31:26Z" uuid="009257fd-3f66-449d-b554-6a095f917b74">
    <xfa:datasets>
            <xfa:data>
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</UserID1>
                            <UserName1>Sarah Rose</UserName1>
                            <UserID2/>
                            <UserName2/>    
                            <UserID3/>
                            <UserName3/>
                            <!-- this is to be coiped in above -->
                            <CurrentUserID>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</CurrentUserID>
                            <CurrentUserName>Sarah Rose</CurrentUserName>
                        </UserInfo>
                    </applicantInformation>
                    <FSTARGETURL_/>
                </GetUserRoot>
            </xfa:data>
            <dd:dataDescription dd:name="GetUserRoot">
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1/>
                            <UserName1/>
                            <UserID2/>
                            <UserName2/>
                            <UserID3/>
                            <UserName3/>
                            <CurrentUserName/>
                            <CurrentUserID/>
                        </UserInfo>
                    </applicantInformation>
                </GetUserRoot>
            </dd:dataDescription>
        </xfa:datasets>
    <pdf xmlns="http://ns.adobe.com/xdp/pdf/" href="-4608764380271080676-28"/>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
            <annots/>
        </xfdf>
    </xdp:xdp>

    Any help to what I'm doing wrong.

    Thank you.

    -

    Afonso

    Your mission is incorrect. Note that you need to reference all the XML nodes (to the right of the ROOT node)

    Since your reference node is not absolute, it will create the nodes that you have defined in your expression on the left.

    The following code should work as expected!

    /process_data/xmlData/xdp/datasets/data/GetUserRoot/applicantInformation/UserInfo/UserID1 = /process_data/xmlData/xdp/datasets/data/GetUserRoot/applicantInformation/UserInfo/CurrentUserID
    

    Nith

  • Set the value of the page elements using apex.submit

    Hey,.

    Does anyone have an idea how to set the value of several page elements using apex.submit?

    Here is my request, she works for this element of the page, but I want to first the value of the other elements of the page (i.e. P30_SHOW_REF) as well.

    select s.nr as NRR, 
    '<input type="button" value="clickme2" onclick="document.getElementById(''BUTTONS'').style.display = ''block'';apex.submit({request:''SET'',set:{''P30_KLT_NR'':'||s.nr||'});"/>' Button 
    from klant s
    

    Thanks in advance!

    Hi Julijan,

    Here is the example:

    apex.submit({
      request:"DELETE",
      set:{"P1_DEPTNO":10, "P1_EMPNO":5433});
    

    Concerning

    J

  • How to use PL/SQL to create dynamic action to set the value of a selection by another list?

    Hello

    I would like to know how to use PL/SQL to create dynamic action to set the value of a list of selection by another selection list.

    1.PNG

    I wish can create dynamic action to manage the two above the Room select list (: P9_ROOM) and building (: P8_BUILDING).

    When you select "1074" in the bathroom, building highlights like "BRM BLD 5"

    When you select 'Area of the black box' in the room, building must assign the value "7 BLD BRM"

    When the room is Null, building should also be Null.

    I thank you,

    Alice

    I forgot to mention, for the PL/SQL Code, because you are working with items in the selection list, the return values are different from the display on your LOV values, you must instead use the return values.

    Thank you

    Erick

  • How to set the value of the variable bind in VO on page load?

    Hello, I use JDeveloper 11.1.2.3.0.

    I created a VO in my application that uses a variable binding in the where clause. I want to put the value of this variable on the loading of the page automatically.

    I read that I can do this through setNamedWhereClauseParam()... but I can't find out where and how to use it.

    Can anyone help please?

    You can put in different places:

    AppModuleImpl,

    ViewObjectImpl,

    ViewRowImpl

    Just him export the customer interface and use whenever you want

  • Can we use the value of a variable in a warning message

    I have a variable in forms6i. I want to use the value of this variable in an alert message. How is that possible?

    Gul says:
    I have a variable in forms6i. I want to use the value of this variable in an alert message. How is that possible?

    Try

    DECLARE err_txt VARCHAR2(200) t;
     al_id ALERT;
     al_button Number;
    BEGIN
    al_id := FIND_ALERT('My_Error_Alert');
    SET_ALERT_PROPERTY(al_id, alert_message_text, 'Hello how are you mr. variable '||:variable_name );
    al_button := SHOW_ALERT( al_id );
    END; 
    

    Hope it works...

    Hamid

  • How to set the value of QUERY using PL/SQL process?

    Hello

    I use APEX 4.2...
    How to set the value of the REQUEST using process of PL/SQL which lies before the header - where the value of the REQUEST should appear on the URL?

    Kind regards
    Fateh

    You cannot set a value of demand in a PL/SQL block. You can run a PL/SQL block on a request which is the id of a button for example.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

Maybe you are looking for