Changing Property Values from within a Function

I'm wondering how I can change a property of an instance from
within a function inside a method. I have some code here...
Basically I just need to set _lynn_idle to false when a tween is
occuring and _lynn_idle to true when the tween is finished.
Unfortunately I can't seem to simply set it to false or true inside
these listener functions like I'm able to anywhere else (seems the
variable is only local to the function when I need it to access the
variable associated with the instance). Any help is much
appreciated.

Inside callback handlers the class members go out of scope.
To remedy use a local (local to the function) reference to the
current object.

Similar Messages

  • [ASK] Get One Row of Property Value From Dimension in Script Logic

    Hello, i need help about how to get one row of property value from dimension in script logic.
    Let say there is CATEGORY dimension and the members are like this :
    ID                                                  YEAR   Status
    PLAN_2011                                   2011        A
    PLAN_2011_V1                            2011        I
    ACTUAL_2011                              2011        I
    FORECAST_2011                         2011        I
    FORECAST_2011_V1                  2011        A
    PLAN_2012                                  2012        A
    PLAN_2012_V1                           2012        I
    ACTUAL_2012                             2012        I
    FORECAST_2012                         2012        I
    FORECAST_2012_V1                  2012        A
    If i scope CATEGORY like this :
    *XDIM_MEMBERSET CATEGORY = [CATEGORY].PROPERTIES("YEAR") = "2011"
    Then i will get member scope like this :
    PLAN_2011                                   2011        A
    PLAN_2011_V1                            2011        I
    ACTUAL_2011                              2011        I
    FORECAST_2011                         2011        I
    FORECAST_2011_V1                  2011        A
    Question :
    In script logic, how can i read the second record of scope and move it to variable ?
    Ex. : I read second record, so i can get the data of second record (PLAN_2011_V1, 2011, A).
    Is there any function to read all record that had been scope ? So i can read all those 5 records.
    Is there any substring or offset function in script logic ? How to use it ?
    Thank you.

    Hi,
    Firstly, when we scope the logic, it doesnt fetch the entire record from the member sheet. It just fetches the ID.
    Secondly, we dont have the feasibility to read only the second ID and skip the others. However, one alternative is that you use the SELECT statement to store all the IDs in a variable, and then use a FOR loop. But this will loop through all the 5 IDs, as per your example. If you want to skip all the IDs except one, you should maintain some property, so that all the IDs are neglected which doesnt have a particular property value.
    Hope you got the idea.

  • ORA-14551 Call to a proc that performs INSERT from within a FUNCTION

    Anyone,
    I have written a number of functions that serve to convert an old_value to a new_value. But there are some times when the conversion fails. I wish to log those exceptions into a table and move on. I undertand FUNCTIONS are not to insert data but that is why I created a PROC and want to be able to call it from within the FUNCTIONs.
    Is there any way to get around the ORA-14551 error?
    Here is what I have:
    CREATE OR REPLACE FUNCTION MAXIMO.fcn_get_worktype
      ( worktype_IN IN varchar2,
        siteid_IN IN varchar2)
      RETURN  varchar2 IS
      var_worktype varchar2(5);
    BEGIN
         IF siteid_IN IN ('ML','OK','BE') THEN
            BEGIN
                 SELECT NVL(NEW_WTYPE,NULL)
                INTO var_worktype
                 FROM MAXIMO.MAX411_WBK_WORKTYPE$
                 WHERE OLD_WTYPE = worktype_IN;
            EXCEPTION
                WHEN NO_DATA_FOUND THEN
                    MAXIMO.SP_CONVERSION_EXCEPTION('WORKTYPE', 'WORKTYPE', worktype_IN, siteid_IN);
                    var_worktype := 'XX';
                     RETURN var_worktype;
            END;
        END IF;
        RETURN var_worktype ;
    END;And here is my PROC:
    CREATE OR REPLACE PROCEDURE MAXIMO.sp_conversion_exception (table_IN IN VARCHAR2, column_IN IN VARCHAR2, value_IN IN VARCHAR2, tab_ID IN VARCHAR2)
    IS
    BEGIN
        INSERT INTO MAXIMO.MAX411_CONVERSION_EXCEPTIONS
             ( TABLE_NAME,
             COLUMN_NAME,
             VALUE ,
              TAB_ID)
        VALUES
             ( table_IN,
             column_IN,
             value_IN,
              tab_ID );
        EXCEPTION
            /* If value was already recorded then do not record again, Key is on all three columns */
            WHEN DUP_VAL_ON_INDEX
                THEN
                    NULL;
        COMMIT;
    END;Can anyone shed any light on how I can stop getting:
    ERROR at line 1:
    ORA-14551: cannot perform a DML operation inside a query
    ORA-06512: at "MAXIMO.SP_CONVERSION_EXCEPTION", line 5
    ORA-06512: at "MAXIMO.FCN_GET_WORKTYPE", line 16
    ORA-01403: no data found
    ORA-06512: at "MAXIMO.LOAD_PM", line 181
    ORA-06512: at line 1
    Thanks in advance for any help I can get...
    Miller

    You need a PRAGMA AUTONOMOUS_TRANSACTION in your exception procedure, eg:
    CREATE OR REPLACE PROCEDURE MAXIMO.sp_conversion_exception (table_IN IN VARCHAR2, column_IN IN VARCHAR2, value_IN IN VARCHAR2, tab_ID IN VARCHAR2)
    IS
      PRAGMA AUTONOMOUS_TRANSACTION
    BEGIN
      ...

  • Edit persistent timestamp property value from SAP MII Administration menu

    We have created a MII shared memory attribute with data type timestamp.
    Now we are trying to change the value from Menu->DataService->Shared Memory of the project.
    But it always throws the error : "Error occured while converting the type of the variable".
    Can anyone help in this regard ?
    Edited by: AbhiGh on Feb 13, 2012 6:11 PM
    Edited by: AbhiGh on Feb 13, 2012 6:11 PM

    Create a little transaction with a datetime property holding the value you wish to update.  Use and Assignment action block to update the persistent timestamp property.  Then execute the transaction from your workbench. 
    Would also add a Tracer action block both before and after the Assign action to display the shared memory property's contents. 
    You will have to modify the settings of the property so that it can be updated (uncheck Readonly and you may want to tinker a bit with Protected and Cache checkboxes).
    If you do a mouse over in the workbench for the property or double click to open it up, it will display its original default value and not necessarily the present contents (been a while since I played with them, so this may have changed).
    Regards,
    Mike

  • How to change the value from one input control to another input control?

    Hi Experts,
    I want to change the value from  one input control to another input control. For Example if i change month in first tab. it should reflect in second tab also. How should we acheive through input control or some other option.
    Here I attached screen shot.Please help me for this

    Hi,
    It is not possible to have Input controll in all tabs that will be set from another .
    But There is one workaround .
    Follow the link below .
    http://davidlai101.com/blog/2013/08/13/web-intelligence-input-control-that-affects-all-tabs/

  • Invoking "this" from within a function

    Assume we are in this situation:
    mc.onRollover=function()
    trace(this);
    function dosmthing()
    trace(this);
    The first trace(this) would render the path of the movieclip,
    mc. The second one, however, would render "undefined". Is there a
    way of retrieving the path of the movieclip from within the
    function? I can't hardcode it, since it's dinamically assigned.

    try using a variable:
    mc.onRollOver=function() {
    var t:MoveClip = this;
    trace(t);
    function dosmthing() {
    trace(t);
    //OR pass a reference of 'this' to the function ...
    mc.onRollOver=function() {
    dosmthing(this);
    function dosmthing(t:MovieClip) {
    trace(t);
    'dosmthing' is a 'nested' function, not an 'assigned'
    function, so does not have a path reference.

  • Is it possible to adjust MAX scaling values from within LV?

    I'd like to adjust MAX scaling values from within a LV application- is this possible?
    This is to be used for a 'calibration' feature of an application.

    Yes you can:
     (I have never done it actually)
    Quote from the online help:
    Saves the specified custom
    scale to MAX.
    More info.
    Ton
    Message Edited by TonP on 11-19-2008 08:53 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Example_VI_BD.png ‏2 KB

  • Need help to call a simple function from within another function?

    I created a movieclip which has a function in its one and only frame.
    function testx() {
    x = x+2};
    This movieclip is in the main timeline (in its own layer).
    In another layer on the timeline I have created a single keyframe with a button instance called myBtn
    myBtn.onRelease = function() {
    var x
    x =2
    testx(2);
    trace (x);
    What I want to do is call the function in the movieclip frame from the button press function. However, I can't seem to reference it properly.
    Can anyone help me to basically call a simple function from within another function?

    Yes am using CS4.  Have saved it as CS3 now.  Ok the file is somewhat complicated and what I am testing is not what I ultimately want to do but if I can pass that variable I can figure it out.  In terms of describing the file I think the only parts of importance are what I put in my previous post (please let me know if there is something I should be telling you that I have missed).  I am 99.9% sure that I am using the correct instance name.
    Scene1 Layer3 Frame1 has the function call for the button.
    myBtn.onRelease = function() {
    var x
    x = 2
    testx(2);
    trace (x);
    Slideshow layer //Actions Frame1 has the function
    function testx(x) {
    x = x+2};
    thank you so much for helping me.

  • Reading Queries from within planning functions

    Hi all,
    Does anyone of you have experience with the following thrilling task: We want to read specific queries from within a BPS function, handing over parameters like company code and profit center, retrieving the query results and writing them into a cube.
    Is this feasible and would anyone know about the function modules to use?
    Many thanks in advance,
    Andreas Krüger

    Andreas,
    I found a soultion for your problem.
    I tried at in my system and it works fine.
    Pl do the following:
    1. Have a multiarea with actual and plan areas or have one area but make sure you load data from actual to plan.
    2. In the level, select all the charactetirtics and key figures that you wish to see in the report.
    3. Make a layout and configure it accordingly. If header has mutiple values, make sure you have a variable on that.
    4.Make a folder and execute it.
    5. When the folder is opened, all the data in the cube will be displayed in the change mode.
    6. View the date and change them if you wish, save.
    Let me know if you ned any help.
    Ravi Thothadri

  • Dynamicly change SelectOneRadio value in java script function -- Please hel

    Hello, I need to change SelectOneRadio value within a javascript function. But it doesn't seem to work for me. Can someone tall me what I did wrong or how to get this?
    Thanks a lot!
    I have :
    <h:panelGrid Columns="3">
    <h:selectOneRadio id="myRadio", value="#{myBean.radioOption}" />
         <f:selectItems value="#{myBean.radioOptionList}" />
    </h:selectOneRadio>
    </h:panelGrid>
    <script >
    function needToChangeRadioValue(choice){
    if ( choice == something ) { 
         document.getElementById("myForm:myRadio").value="1"; //doesn't really work
         document.getElementById("myForm:myRadio").immediate="true";
    } else if ( choice == somethingelse ) {
         document.getElementById("myForm:myRadio").value="2"; //doesn't really work
         document.getElementById("myForm:myRadio").immediate="true";
    } else {
         document.getElementById("myForm:myRadio").value="3"; //doesn't really work
         document.getElementById("myForm:myRadio").immediate="true";
    </script>
    -- java --
    ArrayList radioOptionList;
    public ArrayList getRadioOptionList(){
         radioOptionList = new ArrayList();
         radioOptionList.put("1","Option1");
         radioOptionList.put("2","Option2");
         radioOptionList.put("3","Option3");
         return radioOptionList;
    }

    Thank you for the quick response!
    Does it work for you? I tryed getElementsByName("myform:myRadio")[1].value="1"; No errors but the screen doesn't show that radio button is "on". I also created another function to go through the form object and try to set the attribute but no luck. From screen, I still don't see the option is selected(or on). I have :
    <script .... >
    function checkRadioButton(){
    var allElem = document.forms['myform'].elements;
    for ( i=0 ; i< allElem.length; i++ ){
    alert("element name = " + allElem.name ); // I see myform:myRadio three times
    alert("element id = " + allElem[i].id ) // when name="myform:myRadio, id is null/empty
    alert("element value = "+ allElem[i].value ); // when name="myform:myRadio, value = 1, 2, 3 respectively
    if ( allElem[i].name == 'myform.myRadio' ) {
         var attributes = allElem[i].attributes;
    for ( j =0; j < attributes.length; j++) {
              if ( attributes[j].name == 'CHECKED' ) { // I found CHECKED is one of selectOneRadio's attributes
                   if ( i == 1) {
         attributes[j].value = true; // It still doesn't work. I didn't see that option1 get selected/on.
    What I am trying to do is common, I think !!?? Really appreciate your help.

  • How can i get currency values from flatfile to function module

    Dear All,
               I have to take  currency values from flat file and i have to assign those flat file value to function module .
    Eg: "Convert_to_local_currency".  I need technical code how to calculate those amount in work area and how to assign those amount value function module. 
              I need sample program for currency conversion from flat file to function module.  My requirement is based on flat file amount i have to calculate in work area and assign those work area to function module. 
    With Regards,
    Baskaran

    Hi Satish or Baskaran,
    First conform in which format the flat file is present, as abhi mentioned if it is there in notepad
    try to use F.M GUI_UPLOAD as shown below...
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
    FILENAME = 'C:\Desktop\rpf1.TXT'
    TABLES
    DATA_TAB =  ITAB.
    Now loop at ITAB Into Work_area and press the respect currency fields which you want and in the same way
    if the file is in EXCEL format use F.M ALSM_EXCEL_TO_INTERNAL_TABLE
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename = P_FNAME
          i_begin_col = 1
          i_begin_row = 1
        TABLES
          intern = ITAB
    LOOP AT ITAB INTO WA.
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
            EXPORTING
              foreign_currency = wa-waers
              local_currency   = wa-waers
               IMPORTING
              local_amount     = tvals-gross.
        ENDIF.
    endloop.
    And as mentioned loop the records into work area and process the currenct field which is present in the
    ITAB according to its field name. And make sure within the loop you call your function module.
    Regards
    VEnk@
    Edited by: Venkat Reddy on Dec 9, 2009 5:51 PM

  • [CRM] Change sales office from within an order

    We've been trying to get the following to work... as you might guess, so far without success.
    From within a CRM order, if we change the partner number for the department a check is being done whether that partner belongs to the same sales office. If that's not the case, the sales office has to be adjusted.
    Since this might have an effect on authorization, the changing of the sales office has to be done in a separate job (action). In this job, I do the following:
    - Retrieve data on the object
    - crm_order_read for that object
    - select the correct sales office
    - prepare the crm_orgman structure with the new data
    - crm_order_maintain with the crm_orgman and inputfields tables
    - optionally commit work, bapi_transaction_commit etc.
    For as far as we can see, the data is correct. However nothing is being changed. Ideally what I'd like to do is break into the process, change the object that's being processed in memory, and let the system do its job.
    What we've also tried is (shame):
    - Retrieve data on the object
    - crm_order_read for that object
    - select the correct sales office
    - direct update the corresponding tables with the new values
    This works, but as soon as we return control to the system, the changed values (verified, if we look at the tables the values are changed) are reset to what they were.
    It's taking way too much hours for something that should be (in my eyes) a pretty simple action. Any suggestions? Thx in advance!

    Hi Egbert,
    Please take a careful look at the GUIDs you are using: if you are using the orgman structures, the REF_GUID is not the ORGMAN-GUID but instead the ORDERADM_H-GUID. Can you confirm if this has been checked and if it then still is not working? The COMMIT_WORK BAPI is also not necessary.
    Kind regards,
    Joost Janssens
    PS Please reward points if this reply helped you!

  • How to retrieve a property value from an iview in the back-end?

    Hi,
    I am looking for a back-end function module or any other way to retrieve the property value of an iview in the portal.
    Is this possible?
    thanks,
    Bert Caryn

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

  • DRm 11.1.2.103: Howto: Not allowed to change property value after value set

    Tips on how to ensure this?
    I would appreciate help on solving the following request: a property must be set by a user (ex property 'Entitytype' of a Unit node). However as soon as the property has been defined (value of property is not blank) this cannot be overridden again (example; if Unit node is set to COMPANY it cannot be set to DEPARTMENT, but the property value must be allowed to be set in the first place and overridden if blank only) Also remove value of this property should not be allowed if value is not blank or 'nothing. I assume this must be a common request, but I cannot get my head around how to solve this in DRM since DRM does not have a way to check the 'previous value' of a propery when validating (as far as I know)

    Hi,
    Try this
    1. Create a derived property e.g. Can_Change with a formula like this
    Equals(Date,Now(),AddedOn()) --depending on your requirement you may either use AddedOn() or ChangedOn()
    This will return True of the system date and create date are same. which mean user should be able to change the value for the first time.
    Now create a real-time validation based on the above property to stop the user from changing the value.
    hope this helps.
    SJ

  • How to Get property values from Shared Object in client's load event - Very urgent

    I am using shared object to share data between two users. First user connect to shared object and set some value in shared object. Please consider that second user has not connected with the shared object yet.
    Now when second user connects to the server and try to get that property set by first user, he could get shared object but could not get properties of Shared object set by first user. I observed few times that Second user can get these properties within "Sync" event between two users. But I would like to get these values for Second user in any stage (i.e. in load event etc.). Whenever Second user tries to get the property of Shared object, the object will reset the actual property value and then return reset value.
    Anyone faced such issue while using shared object between two users. If so, I would appreciate if you could let me know your suggestions for following questions:
    1) Is there any way to get all the properties of shared object before sync event called, as I want to get it immediately when second user connect to the application and perform next task based on the values stored in shared object.
    2) Is it possible for second user to check whether any property has been set by first user? So that second user can use the property instead of reset it.
    Any kind of help would be greatly appreciated.
    Thank You.

    I am using shared object to share data between two users. First user connect to shared object and set some value in shared object. Please consider that second user has not connected with the shared object yet.
    Now when second user connects to the server and try to get that property set by first user, he could get shared object but could not get properties of Shared object set by first user. I observed few times that Second user can get these properties within "Sync" event between two users. But I would like to get these values for Second user in any stage (i.e. in load event etc.). Whenever Second user tries to get the property of Shared object, the object will reset the actual property value and then return reset value.
    Anyone faced such issue while using shared object between two users. If so, I would appreciate if you could let me know your suggestions for following questions:
    1) Is there any way to get all the properties of shared object before sync event called, as I want to get it immediately when second user connect to the application and perform next task based on the values stored in shared object.
    2) Is it possible for second user to check whether any property has been set by first user? So that second user can use the property instead of reset it.
    Any kind of help would be greatly appreciated.
    Thank You.

Maybe you are looking for