Error while saving dynamic row values of datagrid with record.

hi friends,
i am trying to add dynamic row in datagrid and save that value with record.i succeeded in first part while i am saving the record the error show like this.
errro:Property fromAmount not found on com.ci.view.Task and there is no default value.
how i resolve this error.
any suggession welcom
thanks in advance.
B.venkatesan
code:
package:
package com.ci.view
    [Bindable]
    public class Task
        public function Task(frmAmount:String,toAmount:String,commissionPercentage:String)
            this.frmAmount=frmAmount;
            this.toAmount=toAmount;
            this.commissionPercentage=commissionPercentage;
        public var frmAmount:String;
        public var toAmount:String;
        public var commissionPercentage:String;
main mxml:
[Bindable]
            private var tasks:ArrayCollection;
            private static const ADD_TASK:String= "";
            private function init():void
                tasks = new ArrayCollection();
                tasks.addItem(new Task("0","1000","0"));
                tasks.addItem({frmAmount:ADD_TASK});
            private function checkEdit(e:DataGridEvent):void
                // Do not allow editing of Add Task row except for
                // "Click to Add" column
                if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                    e.preventDefault();
            private function editEnd(e:DataGridEvent):void
                // Adding a new task
                if(e.rowIndex == tasks.length - 1)
                    var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var txtIn1:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var txtIn2:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var dt:Object = e.itemRenderer.data;
                    // Add new task
                    if((txtIn.text) != ADD_TASK)
                        var x:String=String(txtIn.text);
                        tasks.addItemAt(new Task("", "", ""), e.rowIndex);
                    // Destroy item editor
                    commPlanDetGrid.destroyItemEditor();
                    // Stop default behavior
                    e.preventDefault();

Venktesan,
You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
ORIGINAL:
if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                    tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
EDITED:
if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                    tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
Thanks
Pradeep

Similar Messages

  • Implicit coercion Error while Adding Dynamic Rows To Flex DataGrid

    Hi friends
    I   want to add interger for in next next rows while clicking tab   button,one i enter all the values in one row if i press tab means next   row will be editable.for making that i added the following code.i have   some error shows like this
        [Bindable]
                    private var tasks:ArrayCollection;
                    private static const ADD_TASK:int= "";
                    private function init():void
                        tasks = new ArrayCollection();
                        tasks.addItem(new Task(0.01,100000,0));
                        tasks.addItem({frmAmount:ADD_TASK});
                    private function checkEdit(e:DataGridEvent):void
                        // Do not allow editing of Add Task row except for
                        // "Click to Add" column
                        if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                            e.preventDefault();
            private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                    var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var dt:Object = e.itemRenderer.data;
                    // Add new task
                    if(parseInt(txtIn.text) != ADD_TASK)
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----->Multiple markers at this line:
                                                                                                                               -1067: Implicit  coercion of a value of type String to an unrelated type int.
                                                                                                                                  -txtIn
                    // Destroy item editor
                    commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                    e.preventDefault();
            ]]>
    Please help if any suggession
    Thanks in advance
    B.Venkatesan

    Venktesan,
    You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
    ORIGINAL:
    if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    EDITED:
    if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    Thanks
    Pradeep

  • Error while Adding Dynamic Rows To Flex DataGrid

    Hi friends
    I want to add interger for in next next rows while clicking tab button,one i enter all the values in one row if i press tab means next row will be editable.for making that i added the following code.i have some error shows like this
    [Bindable]
    private static const ADD_TASK:int = 0;
    private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                    var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var dt:Object = e.itemRenderer.data;
                    // Add new task
                    if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
                    // Destroy item editor
                    commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                    e.preventDefault();
    Please if any suggession welcome.
    Thanks in advance.
    B.venktesan

    Venktesan,
    You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
    ORIGINAL:
    if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    EDITED:
    if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    Thanks
    Pradeep

  • Implicit coercion of a value of type String to an unError while Adding Dynamic Rows To Flex DataGrid

    Hi friends
    I  want to add interger for in next next rows while clicking tab  button,one i enter all the values in one row if i press tab means next  row will be editable.for making that i added the following code.i have  some error shows like this
        [Bindable]
                    private var tasks:ArrayCollection;
                    private static const ADD_TASK:int= "";
                    private function init():void
                        tasks = new ArrayCollection();
                        tasks.addItem(new Task(0.01,100000,0));
                        tasks.addItem({frmAmount:ADD_TASK});
                    private function checkEdit(e:DataGridEvent):void
                        // Do not allow editing of Add Task row except for
                        // "Click to Add" column
                        if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                            e.preventDefault();
            private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                    var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var dt:Object = e.itemRenderer.data;
                    // Add new task
                    if(parseInt(txtIn.text) != ADD_TASK)
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----->Multiple markers at this line:
                                                                                                                             -1067: Implicit coercion of a value of type String to an unrelated type int.
                                                                                                                                -txtIn
                    // Destroy item editor
                    commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                    e.preventDefault();
            ]]>
    Please help if any suggession
    Thanks in advance
    B.Venkatesan

    The error message indicates the problem fairly clearly.  _feed_list is defined as a ComboBox in your first line of code.  You are passing that as an argument in your populate(_feed_list) line of code.  However, the populate function is expecting an XMLList object to be passed, not a ComboBox.
    You probably really mean to be using...
              populate(feed_items);
    since that is the only XMLList to be found

  • Error while saving some default value in excel file

    Hi,
    I have been trying to accomplish a very simple task. I am trying to save values used in “PARAMETERS DESCRIBING PATH” of  "Photo_Diode_N_Motors_DAQ" and want to reload the same values in “PD_Display_From_Spreadsheet”. There is a function named “Display to Motor” in “PD_Display_From_Spreadsheet” which will use four of those values namely y_intial, y_step_size, z_intial, z_step_size. Needless to say that I am not able to do successfully. Each time I am trying to run, I am getting following error:
    “Error 1 occurred.
    Possible reason(s):
    LabVIEW:  An input parameter is invalid.
    NI-488:  Command requires GPIB Controller to be Controller in Charge.”
    However, if I remove the part where I am saving those values, it works fine.
      You may like to have look at frame 1 of "Photo_Diode_N_Motors_DAQ" as well as use of “Display to Motor” in “PD_Display_From_Spreadsheet”.
    Thanks,
    Dushyant
    Attachments:
    Program.zip ‏418 KB

    Hello,
    No problem about the help, I am glad to have helping you get rid of the problem! I think I see the dialog your are referring to now.  Is it the one that asks the user to replace the file?  If so, this is because when the file already exists, the default behavior of the File Open/Create/Replace funtion (used inside the Write to Spreadsheet File.vi) is to show "advisory dialogs."  You can turn those off though, if you'd like, by wiring the boolean input within the Write to Spreadsheet File.vi.  I have attached a version of that Write to Spreadsheet File with Advisory Selection.vi called, and used it in a new version of the test VI you sent.  Together, they give the behavior of writting a file you choose (say MyFile.txt) with the front panel control, as well as a file named with _new appended to it (say MyFile_new.txt).  By exposing the underlying advosory boolean, we can supress or expose such dialogs in all instances you wish.
    Was that the dialog problem?  Try the VIs attached in the zip file!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear
    Attachments:
    slightly modified VIs.zip ‏32 KB

  • Error while saving dynamic hierarchy

    Hi,
    I'm configuring consolidation on BPc NW 7.5.
    I get an error message while I try to save Dynamic Hierarchy. The error message says that : "Error running default logic ()".
    Pleaes note that I dont have anything in the default logic.
    Please help.
    Regards
    SSC

    Hello SSC,
    I believe that this SAP KBA will guide you on this:
    1523410 - BPC 7.x NW Getting "Error running default logic () "
    Best regards,
    Vin

  • WriteTreeData: Error while saving Dynamic Hierarchy Changes

    Hi Experts,
    I'm encountering an error "writeTreeData: Error in clsMain::writeData : Type mismatch" when I save the changes that I've made in the Dynamic Hierarchy Editor, does anyone encountered this error before? I'm using BPC 7.0 MS.
    Thanks,
    MVS

    HI gUYS
    i've encountered this problem and my only solution is to see if all the fields in the above portion of the DHE is a base member
    example
    for my time dimension i've noticed that it is in the parent member
    time = 2008.yr
    if just replace it with
    time = 2008.dec
    and then it works
    Thanks
    CSD

  • Error while saving model to the reporting repository with logical views

    I have created a view object in the logical model based on objects from the logical model. When I try to save the model to the reporting repository, an error occurs.` If I remove the view object, I can successfully save the model to the reporting repository. Here is the log detail:
    2012-03-01 14:00:50,419 [Thread-71] ERROR ReportsHandler - Error Exporting to Reporting Schema:
    java.lang.ClassCastException: oracle.dbtools.crest.model.design.logical.AttributeView cannot be cast to oracle.dbtools.crest.model.design.logical.Attribute
         at oracle.dbtools.crest.model.design.logical.LogicalDesign.getObjectsWithMeasurements(Unknown Source)
         at oracle.dbtools.crest.exports.reports.RSMeasurements.export(Unknown Source)
         at oracle.dbtools.crest.exports.reports.ReportsHandler.export(Unknown Source)
         at oracle.dbtools.crest.swingui.ControllerApplication$ExportToReportsSchema$1.run(Unknown Source)
    Any thoughts on what is wrong.
    Thanks

    Hi,
    thanks for feedback.
    Any thoughts on what is wrong.The program code is wrong - I logged bug for that.
    Philip

  • Error while saving date value in Java dictionary

    Hello Everybody,
    I got following error while saving date value in one of the fields of the Java table.
    Internal error occured in submit request: Error in method updateRequestContact : The object of type java.sql.Date with the value '2005-12-04 08:00:00.0' assigned to host variable 9 is not normalized. It must not contain time components in the time zone running the virtual machine.
    I can't find why it is taking time value in the date object.
    This value is coming from the RFC as a date value, and I am saving this value in Java dictionary table.
    Same code for this was working fine earlier. But, now suddenly it gives error like this.
    Even if I provide date on the screen from webdynpro application, this date value can't save in the Java dictionary and gives same error.
    What should be the problem behind this?
    Regards,
    Bhavik

    Hi Satyajit,
    I am getting date value from the screen of the webdynpro application from date picker control and passing this value in Java dictionary.
    More Information:
    I have dat value in the Date object: <b>target_date</b>
    But Now I have made new Date object as following:
    Date target_Date1 = new Date(target_date.getYear(),target_date.getMonth(),target_date.getDate());
    Then I am passing this object to Java dictionary. Still it gives same error.
    Then I have changed code as following:
              int l_year;
              int l_month;
              int l_days;
              l_year = target_Date.getYear();
              l_month = target_Date.getMonth();
              l_days = target_Date.getDate();
         Date target_Date1 = new Date(l_year,l_month,l_days);
    Now it works for me.
    But I guess this is not the perment solution. It looks very strange. I have used so many date objects at various palces. So, this solution is not the final for me.
    I want to findout the main cause of it.
    One more thing: This code was working for a mornth or two. But, now suddenly it is giving this error.
    Please help me if anybody knows.
    Regards,
    Bhavik

  • RunTime Error while saving a Sales Order

    Hi All,
    When i am saving a Sales Order, the system is throwing a Runtime Error.
    The ABAP Code in the Runtime Error screen as follows.
              select * from (t681-kotab) appending table <cond_tab>
                     up to 1 rows
                     where kappl  = se_kappl
                     and   kschl  = se_kschl
                     and   datbi >= se_date
                     and   datab <= se_date
                     and   (coding_tab).
    Till these days, there was no such error while saving a Sales Order.
    How to resolve this issue?
    Regards
    Pavan

    Hi,
    The below piece of code is trying to get the contents of the table mentioned in T681-KOTAB.
    select * from (t681-kotab) appending table <cond_tab>
    up to 1 rows
    where kappl = se_kappl
    and kschl = se_kschl
    and datbi >= se_date
    and datab <= se_date
    and (coding_tab).
    The reason could be is someone has screwed up the entries in T681 table. Check that out.
    Try to put a break point on this SELECT query and see what the value of T681-KOTAB holds before the SELECT query. Check whether such a table entry exists in DB.
    Let me know if you are still stuck up.
    If you can send me the ST22 dump of the run time error, i might be able to help you more  on this.
    Hope this helps.
    Thanks,
    Balaji

  • Error while saving the Sales Order

    Hi experts,
        i am getting a runtime error while saving a sales order stating: SAPSQL_EMPTY_TABNAME. It says the field T681-KOTAB could be empty. I would give in more inputs. Someone plz help.
    Thanks.

    I would expect that KOTN521 would be a Database table defined in the ABAP Dictionary that relates to the condition implemented in 521 for the usage specified in that record.
    You should be able to go into the info system, SE84, and search under ABAP Dictionary / Database Tables to see what KOTN521 is.
    Also, since the only Keys to T681 are KVEWE and KOTABNR, and there are two KOTABNR entries with a value of 521, then there must be two different usages (KVEWE) associated with that table.
    If you see what they are, you can check to see what the usages represent.   Based on a lookup, it appears that a usage of N is for Free Goods, A is for Pricing etc.   In our system, we only have A entries.
    What are the usages for the 521 entries?  Do they relate to Free Goods/Pricing???
    Does the table KOTN521 exist in the ABAP Dictionary?
    Answering these questions may get you closer to the answer.
    Can you compare the values in these entries to what you have in different SIDs?
    Is this problem happening in Production, or is it still in a development or Quality Assurance client?
    If it is still in development or Q, then it may be that a recent customization change was made.
    Compare the entries across your systems, if possible.
    Good luck
    Brian

  • I am getting error while saving new WORKFLOW

    Dear All,
    Please help me for the following issue.
    I am trying to make new WORKFLOW but system gives a ERROR while saving from SWDD tcode.
    error is:
    System error: Function cancelled
    Message no. WD255
    Regards,
    Mukesh

    Hi Mukesh,
    You have to maintain the Prefix numbers in the system, in tcode SWU3 --> maintain definition environment --> Maintain prefix number --- > click on execute button.
    There, create a new value for your client(XXX) system to generate the workflow definition / task definition.
    Regards,
    Murali Krishna.

  • Error While Saving As PDF

    Hello,
    We are on HFM 11.1.2.1.103 and financial reports 11.1.2.1.00 and I am having an issue when running a report batch. I have a batch that I run each month which contains a few reports which are emailed out to users. For some reason, the second time the batch runs on one of the reports for a different entity (using bursting on the entity) I get the below error message.
    Error while saving as PDF
    Index: 3, Size: 3
    Any thoughts? The email goes out fine and the other reports are fine.
    Thanks,
    Jason

    Check KM article id 1504257.1.
    It says following solution :
    1. On the FR server, navigate to Oracle \ Middleware \ EPMSystem11R1 \ products \ financialreporting \ bin.
    2. Double-click FRConfig.cmd.
    3. When the Java window (Java Monitoring & Management Console) pops up, click on the MBeans tab.
    4. Expand com.hyperion > Financial Reporting > Attributes.
    5. Locate the PrintServers entry.  Remove any invalid server names from the Value field.
    6. Stop and start the Hyperion Financial Reporting Web Application.

  • WCM Error while saving Project

    Hi,
    I am getting following error while saving new created project in cProject.
    Saving is not possible because the WFM Core data could not be adjusted
    Message no. PRP086
    Diagnosis
    When checking the project role or project role staffing, differences to the related WFM Core data were found. The project cannot be saved because the data cannot be adjusted. Possible causes for this include:
    The WFM Core is not installed locally. When working with the application, the WFM Core service is suddenly no longer available.
    The WFM Core configuration has been changed in Customizing.
    The WFM Core is only activated after projects have been created. During the automatic adjustment of data, it is determined that resources unknown in the WFM Core are assigned to existing project role staffing.
    When working with the application, an existing resource already assigned in the WFM Core is deleted.
    System Response
    The project cannot be saved.
    Procedure
    Contact the system administrator if the required resource is not known in the WFM Core. The project can be saved as soon as the resource is created.
    Let me know how to resolve this issue??
    Thanks in advance,
    Atul.

    hi Atul,
    Are you using WFD server for your resource planning in cProjects???
    If yes, you have to do settings in customizing for the same in Workforce deployment server under Resource Management in cProjects.
    If not, then do following settings to remove the error you are getting:
    1) SPRO -> Collaboration Projects -> Resource management-> Business Partner-> Set Up Integration of HR,
    Maintain following setting:
    Group     Sem. abbr     Value abbr     Description
    HRALX     HRAC     X     Activate HR Integration
    2) SPRO -> Collaboration Projects ->  Resource management Qualification Management->  Activate Qualification Search and Matchup Using WFM Core
    In this, deactivate the use of WFD Core for the qualification match up and the search by deleting the X under Value abbr. in the activity Activate Qualification Match up and Search Using WFM Core.
    Hope this will be helpful to you.
    Regards,
    Niraj Sikligar

  • Automatic Picking giving error while saving the Delivery

    Hi
    We have done the configuration for doing automatic picking while saving the delivery.
    Steps done are
    1. TCode V/38
    2. TCode OVLT  where we have changed the Time value form 3 to 4 for  Send Immediate
    3. TCode VP01SHP where all shipping points are maintained.
    we are getting the following error while saving the delivery.

    Execute ST22 and go through the explanation given under the tab "Error analysis" and "How to correct the error".  Ask your ABAP team to look into this if you are not able to find out the root cause of the issue.
    G. Lakshmipathi

Maybe you are looking for