Using variables for an AS2 function arguments

Hello

I am trying to create a function in ActionScript 2.

After you create the function, I want to use the values stored in the variables specified for the arguments to the function instead of manually typing the static values for the arguments to the function. And also I want to use the function to assign a new value to the existing variable. Is this possible?

For example, I've defined variables "here is a simple function named"CalculationA".

var CoinA:Number = 10;
var CoinB:Number = 20;
var CoinC:Number;


function CalculationA (CoinA, CoinB, stuck) {}

Stuck = Number (CoinA) + Number (CoinB);

}

The code above does not really. No value is assigned to the variable stuck.

Can someone give me a good AS2 code please?

Thank you

use:

var CoinA:Number = 10;
var CoinB:Number = 20;
var CoinC:Number;

CalculationA (CoinA, CoinB);

function CalculationA(coinA,_coinB):Void {}

Stuck = Number (coinA) + Number (coinB);

}

Tags: Adobe Animate

Similar Questions

  • Using variables for the AS2 function arguments

    Hello

    I am trying to create a function in AS2.

    After you create the function, I want to use the values stored in the variables specified for the arguments to the function instead of manually typing static values for the calculation of the service. Also, I want to use the function to assign a new value to the existing variable.

    I asked a similar question here 2 days ago and got the answer (thanks), but now I have another question - how to create the function to assign a value to the variable, the variable itself is also a function argument?

    For example, I have 6 numeric variables:

    var CoinA:Number = 10;
    var CoinB:Number = 20;
    var CoinC:Number;

    var CoinD:Number = 30;
    var CoinE:Number = 40;
    var CoinF:Number;

    Then I tried to create a function to assign values to the variables stuck and CoinF:

    function CalculationA(FirstCoin,_SecondCoin,_ThirdCoin):Void {}

    FirstCoin = SecondCoin + ThirdCoin;

    }

    CalculationA (stuck, CoinA, CoinB);
    CalculationA (CoinF, stuck, CoinF);

    The code above didn't really affect the values of 30 and 70 stuck and CoinF variables, but instead, stuck and CoinF values are undefined.

    Please give me the correct code if there is a good way to do this.

    Thank you

    Here's a way to do it, passing a string value with the name of the variable instead of the actual variable name...

    var CoinA:Number = 10;
    var CoinB:Number = 20;
    var CoinC:Number;
    var CoinD:Number = 30;
    var CoinE:Number = 40;
    var CoinF:Number;

    function CalculationA(FirstCoin,_SecondCoin,_ThirdCoin):Void {}
    This [FirstCoin] = SecondCoin + ThirdCoin;
    }

    CalculationA ('stuck', CoinA, CoinB);
    CalculationA ("CoinF", CoinD, person);

    (Note that in your second function call, I changed coins since CoinF (ThirdCoin) is not defined at this time).

  • Substitution variables for the DTS functions in forms of planning


    I would like to use variables of substitution for QTD and last YEAR in a form of planning.  I have active DTS.  I can select them as members, but cannot enter as variables.

    I created a variable containing "Y-T-D (Feb).  I also tried 'YTD (Feb).   And I tried with and without quotes.  The form editor recognizes them as members period but I get an error when you run the preview: variable Substitution or member not found.

    Is someone can confirm that this feature does not exist or explain how to make it work?

    Thank you.

    Here is an example of using a variable of substitution with Q-T-D form

    See you soon

    John

  • Using variables such as table names. Ideas for alternative designs

    Hello

    I am the design of an application that uses synonyms to pull information from the 'client' DBs via links from DB. Synonyms are created with a DB_ID in name (example: CUSTOMER_100, CUSTOMER_200... where the 100 and 200 are DB IDs of 2 separate DBs customer.)

    I have a procedure that selects data in the synonym based on what DB_ID is passed to the procedure. I want to be able to perform this procedure for any entered DB_ID. I know now I can't use variable for the table names names and using EXECUTE IMMEDIATE does not seem suitable for what I'm trying to do.

    Does anyone have suggestions or re-design options, I could use to achieve this generic procedure which will select a certain synonym based on the information of DB input parameters? Thank you.

    CREATE or REPLACE PROCEDURE CUSTOMER_TEST (p_host IN VARCHAR2, p_db_name IN VARCHAR2, p_schema in VARCHAR)

    IS

    v_hostname VARCHAR2 (50): = UPPER (p_host);

    v_instance VARCHAR2 (50): = UPPER (p_db_name);

    v_schema VARCHAR2 (50): = UPPER (p_schema);

    v_db_id NUMBER;

    v_synonym VARCHAR2 (50);

    CURSOR insert_customer

    IS

    SELECT

    c.customer_fname,

    c.customer_lname

    OF v_synonym_name c;

    BEGIN

    -MADE BASED ON INPUT PARAMETERS DB_ID

    Select d.db_id

    in v_db_id

    of t_mv_db_accounts ac.

    t_mv_db_instances I,.

    t_mv_dbs d,

    t_mv_hosts h

    where ac.db_ID = d.db_ID

    and i.db_ID = d.db_ID

    and i.HOST_ID = h.host_id

    and upper (H.HOST_NAME) = v_hostname

    and upper (D.DB_NAME) = v_instance

    and upper (Ac.ACCOUNT_NAME) = v_schema;

    -ADD DB_ID TO NAME SYNOYNM

    v_synonym: = 'CUSTOMER_ | v_db_id;

    FOR cust_rec IN insert_customer

    LOOP

    INSERT INTO CUSTOMER_RESULTS (First_Name, Last_Name)

    VALUES (cust_rec.customer_fname, cust_rec.customer_lname);

    END LOOP;

    COMMIT;

    END;

    /

    RGS,

    Rob

    EXECUTE IMMEDIATE ' INSERT IN CUSTOMER_RESULTS (First_Name, Last_Name) SELECT customer_fname, customer_lname FROM ' | v_synonym;

  • Using variables to get the answers to the questions of fill-in-the-White

    Hello

    Fill-in-the-blank questions, to provide answers. I want to provide these in the form of variables (user-created), rather than in the form of fixed strings (so, as $$ var1$ $ and not as 'Rabbit'). I could not get this to work. The variable input function is available (in the properties panel), but it does not in fact (i.e. even if you select a variable to be entered, it is not actually automatically registered).

    Is there a way around the problem?

    1. NB containing the same question for text entry boxes (rather than fill-in-the-blank questions). If I could get this works for text entry boxes, I'd use questions these rather than fill-in-the-white.

    2. a peut use variables for the answers to the multiple-choice questions. So I hope I can make it work for fill-in-the-blank questions as well.

    Thank you in advance. Marvin DuBois

    That would be my suggestion. I don't have a blog, but using BER of for this kind of questions me as well. And unlike the widget/interaction, that I've mentioned before, BER is an interactive object, which means it can be validated and that there may be a score attached to it. But, it will not help you, since you have to add the correct answers in the same way as for a drop-down list in the issue of the FIB (they are the sorts of TEB). And it is this list that does not enter a variable rather than a fixed sequence of characters.

    This means that you are into stocks advanced, identical to that of my blog posts with the widget/interaction.

    Have a work around (after all I'm the work around Queen) having intercourse, if you don't check that BER, described here:

    http://blog.lilybiri.com/report-custom-questions-part-2

    The idea is to use another interactive object that can have a score. Actually, I use two instances of the same object: a score of 0 and one with score of X and show the right according to the conditional action.

    However if you want to have multiple TEB on the same blade, which must be verified with the same tip action, you will need either the mastery of InfoSemantics (only for output SWF) widget or Javascript.

    Lilybiri

  • Request Direct DB can use Variables?

    Hello

    You can use presentation or the request variables in a direct request of the DB in OBIEE?

    I'll have a lot of problems with the conversion of a select statement with a subquery using the guests and all that, so I was wondering if I could just handle it with the direct request of db.

    Thanks in advance.

    Hello
    Yes, we can use variables for presentation

    Syntax:

    ' @{p_v}', date ' @{date_v}

    Thank you
    saichand.v

  • Cannot use variables

    Hello:

    I have a simple question that I can't solve everything. I can run a simple query:

    $sql = "SELECT name, ARTIST OF nationality where nationality = 'USA" ";

    but when I tried to use a variable as:

    $n = "USA";
    $sql = "SELECT name, ARTIST OF nationality where nationality = $n;

    The query runs, but does not work. I can't use variables for insert or update. Any help is appreciated!

    Try to put the variable in single quotes:
    $sql = "SELECT name, ARTIST OF nationality where nationality ="$n "";

  • Passing an associated variable number between 'for' loops and functions?

    Hello

    I seem to have a problem with the information how variables can be passed between functions and tables.

    I have variable 'capture' put in place as a number.

    grab var: number;

    My intention (I'll do my best to explain) must have a number 'attached' to catch when it is mentioned for the first time in this function, itemClick.

    These must be all relevant tables:

    clickItemArray = [scene_Camp.wood, scene_Ax.ax]

    itemUsableArray = [wood2, ax2]

    ...

    sceneGuyArray = [scene_Camp.guy_Camp, scene_Ax.guy_Ax]

    function itemClick(event:MouseEvent) {}

    for (grab = 0; enter < clickItemArray.length; grab ++) {}

    If (clickItemArray [type] .hitTestPoint (mouseX, mouseY, true)) {}

    addEventListener (Event.ENTER_FRAME, itemRemoval);

    sceneGuyArray [grab] .gotoAndPlay ("guy_Notice");

    trace ("guy_Notice");

    }

    }

    }

    I would like to have the number in place with grab (it would be a 0 or 1, clickItemArray, sceneGuyArray and itemUsableArray) can be passed on to the next function, itemRemoval. I was hoping to use variables I can use the same function for some point clicked on. For example, if the clickItemArray was point 1 (the axe), then sceneGuyArray [Enter] would be = 1, and would play the right frame. Number 1 would be transferred to the itemRemoval function, where he would constantly be listening to sceneGuyArray [1] also (where '1' would have been obtained through the initial 'grab' in the first function) and react accordingly.

    function itemRemoval(event:Event) {}

    for (var grab2:uint = grab; grab2 < sceneGuyArray.length; grab2 ++) {}

    If (sceneGuyArray [grab2] .currentLabel == 'guy_NoticeDone') {}

    removeEventListener (Event.ENTER_FRAME, itemRemoval);

    trace ("cheese");

    }

    }

    }

    I can't get the track works well. I don't know I'm doing something wrong with 'for' loops or the stated case.

    Naturally, help would be appreciated.

    then, in itemClick(), use:

    Grab = itemClickArray.IndexOf (Event.currentTarget)

  • How to create unique variables for... in loop? (AS2)

    Hello

    I have a function onEnterFrame controlling all the movie clips in a table. The movement of each of these clips is controlled by a few variables - speed, acceleration, etc - that are changed on every enterFrame. I can't understand how to create unique variables for each element of the array. Now my variables are the same for all elements, and therefore the proposals of each video clip are the same.

    I used this code to add my video clips in the table:

    for (i = 0; i < starNumber; i ++) {}
    duplicateMovieClip (star, "star" + I, i);
    starArray.push (this ["star" + String (i)]);
    }

    I do a similar thing to create unique variables for each? Or is there something I need to do my loop (myClip in myArray) which is contained in my onEnterFrame function?

    I can post my code if that would help (65 lines).

    Creating unique variables is easy way out. Here's the modified code using unique variables that should solve your problem:

    var i: Number;

    var starArray:Array = [];

    var starArray_X:Array = [];

    var starArray_Y:Array = [];

    var mc:String;

    var scale: number;

    var speedXMod:Number;

    var speedYMod:Number;

    var starNumber:Number = 10;

    var minSize:Number = 15;

    var maxSize:Number = 80;

    var speed: number = 0.2;

    var minSpeed:Number = 0;

    var maxSpeed:Number = 1;

    for (i = 0; i< starnumber;="">

    duplicateMovieClip (star, "star" + I, i);

    starArray.push (this ["star" + String (i)]);

    }

    (MC starArray) {}

    starArray [mc] ._x = (Math.Random () * Stage.width);

    starArray [mc] ._y = (Math.Random () * Stage.height);

    scale = (minSize + (Math.Random () * (maxSize - minSize)));

    ._xscale starArray [mc] = scale;

    starArray [mc] ._yscale = scale;

    var startSpeedX:Number = ((Math.pow (-1, (Math.round (Math.random ())) * (minSpeed + (Math.Random () * (maxSpeed - minSpeed)));)))

    var startSpeedY:Number = ((Math.pow (-1, (Math.round (Math.random ())) * (minSpeed + (Math.Random () * (maxSpeed - minSpeed)));)))

    [mc] starArray_X = startSpeedX;

    [mc] starArray_Y = startSpeedY;

    onEnterFrame = function() {}

    (MC starArray) {}

    speedXMod = ((Math.random () * acceleration)-(0,5 * accélération));

    speedYMod = ((Math.random () * acceleration)-(0,5 * accélération));

    If (((Math.abs (starArray_X [mc] + speedXMod)) < maxspeed)="" &&="" ((math.abs(stararray_x[mc]="" +="" speedxmod))=""> minSpeed)) {}

    [mc] starArray_X += speedXMod;

    } else {}

    [mc] starArray_X = speedXMod;

    }

    If (((Math.abs (starArray_Y [mc] + speedYMod)) < maxspeed)="" &&="" ((math.abs(stararray_y[mc]+="" speedymod))=""> minSpeed)) {}

    [mc] starArray_Y += speedYMod;

    } else {}

    [mc] starArray_Y = speedYMod;

    }

    If (((starArray [mc]._x + starArray_X[mc]) > 0) & ((starArray [mc]._x + starArray_X[mc])))<>

    starArray [mc] ._x += starArray_X [mc];

    } else {}

    starArray_X [mc] * = - 1;

    starArray [mc] ._x += starArray_X [mc];

    }

    If (((starArray [mc]._y + starArray_Y[mc]) > 0) & ((starArray [mc]._y + starArray_Y[mc])))<>

    starArray [mc] ._y += starArray_Y [mc];

    } else {}

    starArray_Y [mc] * = - 1;

    starArray [mc] ._y += starArray_Y [mc];

    }

    }

    }

    }

  • Date to determine functions using the % for the year ended

    I'm trying to figure out how I can use date functions to determine the percentage of my organizations exercise which was completed. For example, our fiscal year starts October 1 and ends on 31 November the following year. Based on the current date, I want to be able to determine what percentage of exercise has been completed. I guess I can set variables for the dates of beginning and end of the fiscal year, and then use the Now() date function to determine the current date. Can I use the DateDiff() function to accomplish this task?

    Calculate the number of days in the fiscal year and the number of days since the beginning of the year and divide:



    I guess your arrival dates are wrong, because there is no 31 November and your year is long 14 months.

  • Using a Global Variable for the input recorder DisplayRange

    I'm assuming; Since I can't do it; that you cannot change the display range of a graphic recorder by using a variable.  If there is a way I'd love to know how.

    Thank you!

    Determine if you can use a global variable is to click right in the parameter field. If the global variable is available in the context menu, then you can use a variable y.

    You can use a variable of the y-axis from the settings.

    You cannot use a variable for the display range of the x-axis parameter. This is because DASYLab needs to know the amount of memory to be allocated at the beginning of the measure.

  • Use of global variable from local variables for business rules

    Someone at - it guidelines on the use of overall compared to the local variables for the business rules? I really don't like the world no matter what, so if someone has a compelling reason to use overall.

    If I use a local variable in the world, is there a single character required for the local variable or no problem with the help of the same name local var in all of business rules.

    Thank you

    Hello

    I bet you have a background in programming. Don't let the 'global' nomenclature lure you into thinking that "bad design - not encapsulated, etc" with regard to business rules. According to John, this area, variable overall are a vehicle to reduce maintenance.

    For example if you have a variable in which all its used BR called CurrMonth and its always the current month, it create once, maintain his assignment in one place and use it anywhere. In this case 'global' is in fact less.

    Kind regards
    Robb Salzmann

  • How to set global variables for use by all THE #subform [0] items of form1. ?

    Hi all

    I don't know how to code javascript but am new to Adobe LiveCycle.  When I open the script editor, I have the following code (the code is in United Nations in bold):

    -form1. #subform [0]: initialize :-(FormCalc, client).

    //////////////////////////////
    TO START: SET GLOBAL PRICES.
    //////////////////////////////

    var Cityscope_Sydney_CostUser1 = 60,39;
    var Cityscope_Sydney_CostUsers2to5 = 3.02;
    var Cityscope_Sydney_CostUsers6to20 = 1.21;
    var Cityscope_Sydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_Sydney_CostHardCopyWithoutOnline = 54,67;
    var Cityscope_Sydney_CostHardCopyAdditional = 14.59;

    var Cityscope_NorthSydney_CostUser1 = 48,40;
    var Cityscope_NorthSydney_CostUsers2to5 = 2.42;
    var Cityscope_NorthSydney_CostUsers6to20 = 0.97;
    var Cityscope_NorthSydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_NorthSydney_CostHardCopyWithoutOnline = 43,54;
    var Cityscope_NorthSydney_CostHardCopyAdditional = 14.59;


    ////////////////////////////
    END: SET GLOBAL PRICES.
    ////////////////////////////

    -form1. #subform [0]: enter :-(FormCalc, client).

    -form1. #subform [0]: output :-(FormCalc, client).

    -form1. #subform [0]: calculate :-(FormCalc, client).

    -form1. #subform [0]: validate :-(FormCalc, client).

    -form1. #subform [0]: preSave - (FormCalc, client).

    < < = etc etc etc = > >

    -form1. #subform [0]. Item1Cost::initialize :-(JavaScript, client).

    -form1. #subform [0]. Item1Cost::enter :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::exit :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::calculate :-(JavaScript, client).

    Store the values of the form of friendly names.
    var AreaSelected = Item1Area.rawValue;
    var NumberOfUsersSelected = Item1Users.rawValue;

    Declare other variables.
    var Users1Calculation;
    var Users2to5Calculation;
    var Users6to20Calculation;


    Calculate the cost to the "components" user will depend on the number of users selected for the region.
    Switch (true)
    {
    If (NumberOfUsersSelected < 2):
    Users1Calculation = NumberOfUsersSelected * Cityscope_Sydney_CostUser1;
    Users2to5Calculation = 0.00;
    Users6to20Calculation = 0.00;
    break;
    If (NumberOfUsersSelected > 1 & & NumberOfUsersSelected < 6):
    Users1Calculation = Cityscope_Sydney_CostUser1;
    Users2to5Calculation = (NumberOfUsersSelected - 1) * Cityscope_Sydney_CostUsers2to5;
    Users6to20Calculation = 0.00;
    break;
    If (NumberOfUsersSelected > 5):
    Users1Calculation = Cityscope_Sydney_CostUser1;
    Users2to5Calculation = 4 * Cityscope_Sydney_CostUsers2to5;
    Users6to20Calculation = (NumberOfUsersSelected - 5) * Cityscope_Sydney_CostUsers6to20;
    break;
    by default:
    Alert ("BROKEN: calculate the individual components of cost of use will depend on the number of users selected for the region.");

    }

    apply the total cost for this article
    Item1Cost.RawValue = Users1Calculation + Users2to5Calculation + Users6to20Calculation;

    -form1. #subform [0]. Item1Cost::validate :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::MouseEnter :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::mouseExit :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::change :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::full :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::MouseUp :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::MouseDown :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::click :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::preSave - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::postSave - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::prePrint - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::postPrint - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::preSubmit:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Cost::docReady - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::docClose - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::ready:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Cost::ready:layout - (FormCalc, client)-

    -form1. #subform [0]. Item1Users::initialize :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::enter :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::exit :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::calculate :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::validate :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::MouseEnter :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::mouseExit :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::change :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::full :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::MouseUp :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::MouseDown :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::click :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::preSave - (FormCalc, client).

    -form1. #subform [0]. Item1Users::postSave - (FormCalc, client).

    -form1. #subform [0]. Item1Users::prePrint - (FormCalc, client).

    -form1. #subform [0]. Item1Users::postPrint - (FormCalc, client).

    -form1. #subform [0]. Item1Users::preSubmit:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Users::docReady - (FormCalc, client).

    -form1. #subform [0]. Item1Users::docClose - (FormCalc, client).

    -form1. #subform [0]. Item1Users::ready:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Users::ready:layout - (FormCalc, client)-

    .. and so on and so forth...

    In short, I want the code in:

    -form1. #subform [0]. Item1Cost::calculate :-(JavaScript, client).

    .. .to be able to access the variables I created in:

    -form1. #subform [0]: initialize :-(FormCalc, client).


    (I guess that's where I store global variables)

    At this point, global variables are not accessible with the above configuration.  Was the only one I can get this working is to cut and paste the Globals in each item of form1. #subform [0], which of course defeats the purpose of global variables!  I intend to have a lot more items so wouldn't duplicate global variables for each of them!

    Can someone show me how to do this?

    Any help is very appreciated!

    Thank you

    Stanbridge

    Post edited by: stanbridgej - colors and fonts or not will not save.  Are bolded my question make (non-fat) code easier to read (I hope).

    I haven't used Formccalc, but I thought it would be the same regardless. Insert a script object to the top of the hierarchy and call it, for example "sco." Paste the Globals. Then refer to variables of the extent that sco. Cityscope_Sydney_CostUser1, etc. Make one

    App.Alert (sco. Cityscope_Sydney_CostUser1);

    one of the fields. If the debugger is activated, it will tell you if it cannot resolve the reference as "sco. In this case, you may need to use the som expression to reference the script object, for example

    var scoScript = xfa.resolveNode ("topOfHierarchy.sco");

    scoScript.Cityscope_Sydney_CostUser1

    But if as close as possible to the top of the hierarchy above should work.

  • the filter value (with presentation variables) for applications using "SQL issued.

    If I have a "emitted SQL":


    SELECT saw_0 saw_0, saw_1 saw_1, saw_2 saw_2, saw_3 saw_3, saw_4 saw_4 (FROM)
    SELECT saw_0 saw_0, saw_1 saw_1, SUM (saw_2) saw_2, SUM (saw_3) saw_3 SUM (saw_4) saw_4
    Of
    (
    (
    SELECT 'period '. "" YearMonth "saw_0,"Customer. " "" CustomerName "saw_1, COUNT ('dirty'. ("' SalesDate") saw_2, "Sales". "' No.OfConsumer ' saw_3, saw_4 0
    CRM
    WHERE ('period'. ("' YearMonth" > = 200904) AND ('period'. ("' YearMonth" < = 200910)
    )
    UNION ALL
    (
    SELECT 'period '. "" YearMonth "saw_0,"Customer. " "" CustomerName "saw_1, saw_2 0, saw_3 0, Count ("SuperSales". "Saw_4 SuperSalesDate") "
    CRM
    WHERE ('period'. ("' YearMonth" > = 200904) AND ('period'. ("' YearMonth" < = 200910)
    )
    ) t1
    Saw_0 GROUP, saw_1
    ORDER BY saw_0, saw_1
    ) t2 ORDER BY saw_0


    in fact, in this application, I would like to set up a filter to 'period '. "" YearMonth "using the variable of presentation.
    is it possible to do?
    Thank you!!

    Hi Forreging,

    You can use variables of the presentation, but not if you directly set the SQL via the Advanced Options tab.

    Instead, build up the first report like the first part of the statement of the UNION. Then use the "combined with a similar request" to build the logic for the second part of the query.

    When approached in this way, you can set filters on each "subquery" via the criteria in other tab, OBIEE allows you to add an external to the level of the query filter when you go on the road to the SQL code in the Advanced tab.

    Good luck and if you find this post useful, please give points!

    Best regards

    -Joe

  • Using a Variable for dataProvider Information

    I'm trying to use a variable to populate the dataProvider for printing. I pulled the example in Flex 3: training from the source book. When I try to use a variable, I get a Flash Player error, indicating that the provider is not defined. Is anyone know the correct such way to make it work?

    Here is the code:

    private void doPrint(event:Event):void {}

    selection = event.currentTarget.id + "s.dataProvider"

    var pj:FlexPrintJob = new FlexPrintJob();

    If (PJ. Start()! = true)
    {
    return;
    }

    var myPrintView:PrintView = new PrintView();
    this.addChild (myPrintView);
    myPrintView.myPrintDG.showHeaders = false;
    myPrintView.myPrintDG.rowHeight = 18;
    myPrintView.contact.text = "username:"+ uname;»
    myPrintView.myPrintDG.dataProvider = "(select)";
    pj.addObject (myPrintView);
    PJ. Send();
    removeChild (myPrintView);
    }


    This is the line I need to work: myPrintView.myPrintDG.dataProvider = "(select)";

    If I replace "(selection)" with roles.dataProvider, it works fine. I think it's just a matter of syntax. If you look at the previous line, I use a variable for the user name and which works very well.

    Any help would be greatly appreciated.

    Dave

    "Kurrykid" wrote in message
    News:g6vsnc$LPs$1@forums. Macromedia.com...
    > I'm trying to use a variable to populate the dataProvider for printing. I have
    > supported on the example of the Flex 3: training from the source book.
    > When I
    > try using a variable, I get a Flash Player error, indicating that the
    > provider is
    > undefined. Does anyone know the correct way to this guy while he
    > works?
    >
    > Here is the code:
    >
    > private void doPrint(event:Event):void {}
    >
    > selection = event.currentTarget.id + "s.dataProvider"

    VR;

    selection = this [event.currentTarget.id +' is] .dataProvider;

    HTH;

    Amy

Maybe you are looking for

  • How to connect by Satellite 5100 via WIFI?

    Hello I'm new here.I have been searching for an answer days ago and would love to find it here I was wondering if it is possible to connect my laptop Satellite 5100 503 via wireless and how it is possible?

  • Qosmio X 500-function FN keys stopped working

    Today the FN keys stopped working, I wanted to FN + sleep my laptop and noticed it does not, any more than the brightness or all other worked. The only FN key that worked was to lock windows / logout. Any help would be appreciated, thanks!

  • Settings shows 48 songs

    I have no songs downloaded to my iPad but parameters shows 48 songs. Why is this and how to fix, please?

  • How I count from 10 to 0 then back to 10?

    I am a motor with LabVIEW and I would like to advance a position 14 to 0 in increments of 1 then back up to 14 in 1 increments, and stop there. Any suggestions on how I could set up a loop to do. The routine will be part of a state machine base and w

  • USB-6225 DAQmx measurement problems when using a voltagesplitter

    Hi guys I had a serious problem regarding the use of DAQmx USB-6225. Please look at my diagram below: When I measure the waveform sine on AI0, everything is OK. Even with a very sampling rate high as 80kS. When I measure the waveform sine on AI1, eve