Modifying Array position with IViewCursor

I have array print with command
Alert.show(''+ObjectUtil.toString(arrColl));
(mx.collections::ArrayCollection)#0
filterFunction = (null)
length = 4
list = (mx.collections::ArrayList)#1
length = 4
source = (Array)#2
[0] (Object)#3
2008-03 = "1473"
2008-03p = "40,19"
desc = "Usuários únicos"
[1] (Object)#4
2008-03 = "1476"
2008-03p = "-16,80"
desc = "Novos usuários"
[2] (Object)#5
2008-03 = "53114"
2008-03p = "39,25"
desc = "Sessões"
[3] (Object)#6
2008-03 = "45"
2008-03p = "-97,78"
desc = "Tarifação"
uid = "8B1A7D6D-62D1-C9BF-85DD-C538F40ED10D"
sort = (null)
source = (Array)#2
I would like to modify the position of the Array, moving the
last key for the beginning.
thus:
[0] (Object)#3
desc = "Usuários únicos"
2008-03 = "1473"
2008-03p = "40,19"
[1] (Object)#4
desc = "Novos usuários"
2008-03 = "1476"
2008-03p = "-16,80"
[2] (Object)#5
desc = "Sessões"
2008-03 = "53114"
2008-03p = "39,25"
[3] (Object)#6
desc = "Tarifação"
2008-03 = "45"
2008-03p = "-97,78"
my code source, but is not functioning. some tip of the
error?
/code]
//Recebi o resultado e guarda em um array devido
ordenação
var arrColl:ArrayCollection = new ArrayCollection(event.data
as Array);
Alert.show(''+ObjectUtil.toString(arrColl));
if (! runBefore) {
runBefore=true;
for (var i:int=0; i < arrColl.length; i++)
// Get an IViewCursor object for accessing the collection
data.
var myCursor:IViewCursor=arrColl
.createCursor();
// Get the original collection length.
var oldLength:int=arrColl.length;
myCursor.seek(CursorBookmark.LAST);
// The cursor is initially at the first item; delete it.
var removedItem:Object=Object(myCursor.remove());
// The cursor is at the (new) first item;
// move it to the firs item.
myCursor.seek(CursorBookmark.FIRST, 0);
// Add removedItem as the first item.
myCursor.insert(removedItem);
var sort:Sort = new Sort();
arrColl.sort=sort;
// Refresh the collection view to apply the sort.
arrColl.refresh();
//Guarda na variavel o array
dgReport.dataProvider = arrColl;
[/code]

No tip??

Similar Messages

  • Adding item positions with reference to contract in sales order

    Hi all,
    I would be very grateful if some of you could help on this:
    I have a requirement to add lines with reference to a contract while the user is creating or modificating it via VA01 or VA02. The logic flow will be as follows:
    if the user enters a new item position with reference to a contract, and the qty entered exceeds the qty in the position selected of the contract, we have to skip the standard error message and try to spli the quantities in several positions with the same material in the contract.
    As an example:
    the contract 000000000001 has 5 lines:
    line     material       qty
    01       mat1           100
    02       mat1           50
    03       mat1           50
    04       mat2           n/a
    05       mat2           n/a
    if the user picks up the line 02 of the contract to create a new line in the sales order, and enters 180 as qty, the sap standard will raise an error, saying the qty has exceeded the contract qty. Ok, we have to skip that error (maybe could we set it as a warning??) and 'split' the qty as follows:
    in the sales orders, 3 lines will be created automatically
    line    material     qty
         mat1         100
         mat1         50
         mat1         30
    and of course, the released quantities in the contract must be updated: i.e the contract should be as follows:
    line     material       available qty
    01       mat1           0
    02       mat1           0
    03       mat1           20
    Any ideas? : )
    What i've done by the moment is to check is that 'split' is possible, in userexit_save_document. If not (e.g. if the user enters 220 for mat1 in the previous example), a custom error will appear. If it is possible, then the sales order will be created (only with the line the uswer entered) and I will trigger somehow a FM processed in background to modify the sales order.
    my question now is: how can i add lines to the created sales order, making reference to some contract lines?
    I've seen BAPI BAPI_SALESORDER_CREATEFROMDAT2 is used to create a document with reference, but can i use it to MODIFY an existing sales order?
    any help would be greatly appreciated.
    thanks a lot for your help.
    regards.

    Hello,
    there's a function module called 'BAPI_SALESORDER_CHANGE', which could change a sales order. The problem could be,that these BAPI's enque the salesorder. So if you start them in background via an userexit, you have to be sure that the salesorder is updated and dequeued by posting.
    An other way could be to use the exit 'userexit_check_vbap' in MV45AFZB. It's called after creating a new position or changing a position. All existing positions at that time in a internal table 'XVBAP', which you could change. (But be carefull, that you don't create an endless loop !).  
    The check about the contract quantity is in a form routine called 'vbep-wmeng_pruefen_folgebeleg(sapfv45e)'.
    Have a look into the form 'vbap_pruefen_ende' in FV45PFAP_VBAP_PRUEFEN_ENDE. There's the whole thing done including the call of the userexit.
    Regards Wolfgang

  • Displaying Array Position not working in case of descending Order?

    Hi,
    I need to display the array position of the sorted array in Descending order. Here is my code.
         int[] in = {5,3,2,7};
              int[] newArr = new int[in.length];
              int[] na = new int[in.length];
              //copying into a new array
              for(int i=0;i<in.length;i++){               
                   newArr[i] = in;     
              // code for descending order
              for(int j=0;j<in.length;j++){
              Arrays.sort(in);
              na[j] = in[in.length-(1+j)];
              }the sorted array will be will be {7,5,3,2} now according to this i need to display the array position of the sorted array which should be {3,0,1,2} i tried to compare newArr[i] with na[j] but am not gettin the result that i should be getting the same comparison is working in case of Ascending Order but not descending. Any suggestions or help will be appreciated.
    Thanks and regards.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    hi,
    what you are doing is correct only, do not put sort method inside the for loop
    and postion is correct also
    int[] in = {5,3,2,7};
            int[] newArr = new int[in.length];
            int[] na = new int[in.length];
            //copying into a new array
            for(int i=0;i<in.length;i++){
                newArr[i] = in;
    Arrays.sort(in);
    // code for descending order
    for(int j=0;j<in.length;j++){
    na[j] = in[(in.length-1)-j];
    System.out.println("Val --> "+na[j]);
    System.out.println("Position --> "+j);

  • MMM1061: Corrupted array: position mismatch at 0

    Hello
    We got severes errors on Parent Mappings with Pluggable Mappings inside. We can Analyze and Deploy the Parent Mappings without any error, but we get errors on syncrhonizing the Parent Mappings.
    1. Error on Synchronize a Parent Mapping (Pluggable Mappings inside)
    Msg Box:
    MMM1061: Corrupted array: position mismatch at 0.
    MMM1061: Corrupted array: position mismatch at 0.
    2. Error on closing the previously syncrhonized Parent Mapping
    Msg Box:
    INTERNAL ERROR: in MapGenerationLanguageValidator.validate(GENERATION_LANGUAGE, PLSQL)
    3. Error on opening this or any other mapping:
    Msg Box:
    Repository Usage Error: Start nested transaction while already in one. Please contact Oracle Support with the stack trace and details on how to reproduce it.
    All 3 msg boxes have a Detail button with a lot of Java function calls (too much to post it here).
    What we tried so far (but all didn't help so far)
    - Copy existing Pluggable Mapping and use this one in existing Parent Mapping
    - Removing Pluggable Mapping from Parent Mapping and the include it again
    - Recreating Pluggable Mapping from scratch and include it in Parent Mapping
    - Rebuidling new Pluggable Mapping from scratch and also new Parent Mapping, using the newly created Pluggable Mapping
    - Making sure all developers accessing the OWB Repository have the same language settings (English)
    The only thing that helped so far was creating a dummy Pluggable Mapping/Parent Mapping NOT using (including) any other existing objects from this Repository (like tables, etc.)
    The sync strategy (merge, update) has no influence whether we can sync successfully or not.
    My conclusion so far is:
    a) We have a severe internal Repository problem
    or
    b) This OWB version doesn't properly support Pluggable Mappings/Parent Mappings.
    Any1 already had the same problems? We are working with OWB Client 10.2.0.1.31 and Warehouse Builder Repository: 10.2.0.1.0
    Any hint are welcome
    Thank you

    Hi,
    I recommend using the latest OWB Patch 10.2.0.4. The first release of 10.2 was quite buggy concerning pluggable mappings. we did not use them in that version.
    Regards,
    Carsten.

  • Error occurred when modifying array

    I have recently built a new machine with the stuff listed in my profile. I have trawled these formums but have not found any with the specific problem- given that i have not read every thing written perhaps some one can shed some light onto this problem.
    I have a single Seagate Barracuda 120GB SATA drive that is recognised by the Promise BIOS after you press F6 (you get a "no Array defined" error and F6 to setup array or ESC to continue boot.
    Once in the Bios you are offered (correctly) the performance option and all the seagates parameters are recognised correctly. This is true in option 1 auto and 3 define array.  So you select Ctrl Y to build your array and get
    "Error occurred when modifying array. System is going to Reboot ! press any key to reboot"
    I don't know where to begin on this. the machine has no OS on it as I hoped to install XP onto this drive and have Mandrake on the 4GB.
    Any ideas anyone.
    P.S.
    I have lots of cooling and a 400W PSU. :]

    hi
    400w psu does not say ANYTHING.
    for example an enermax 350w has MUCH more power than a q-tec 550w.
    post amps on the 3.3v 5v and 12v rails on the psu.
    should be written on a label on the psu.
    k7n2 is VERY picky about memory and i dont think your memory is approved nforce2 memory.
    there is a thread about memory at the top of this forum.
    try other memory if you have it.
    could also try http://www.memtest86.org
    its a mem test program.
    try to remove zip.
    have seen alot of people having strange problem due to a zip drive.
    bye

  • How to modify array elements from a separate class?

    I am trying to modify array elements in a class which populates these fields by reading in a text file. I have got mutator methods to modify the array elements and they work fine in the same class.
    public class Outlet {
         private Outlet[] outlet;
         private String outletName;
         private int phoneNumber;
         private int category;
         private int operatingDays;
    static final int DEFAULT = 99;
         public void setPhoneNumber(int newPhoneNumber) {
              phoneNumber = newPhoneNumber;
         public void setCategory(int newCategory) {
              category = newCategory;
         public void setOperatingDays(int newOperatingDays) {
              operatingDays = newOperatingDays;
    public static void readFile(Outlet[] outlet) throws FileNotFoundException {
              Scanner inFile = new Scanner(new FileReader("outlets.txt"));
              int rowNo = 0;
              int i = 0;
              String outletValue;
              while (inFile.hasNext() && rowNo < MAXOUTLETS) {
                   outlet[rowNo] = new Outlet();
                   outletValue = inFile.nextLine();
                   outlet[rowNo].setOutletName(outletValue.toUpperCase());
                   outlet[rowNo].setPhoneNumber(DEFAULT);
                   outlet[rowNo].setCategory(DEFAULT);
                   outlet[rowNo].setOperatingDays(DEFAULT);
              inFile.close();
         public static void displayUnassignedOutlets(Outlet[] outlet) {
              int i = 0;
              System.out.println("Showing all unassigned Outlets");
              System.out.println(STARS);
              for (i = 0; i < MAXOUTLETS; i++ ) {
                   if (outlet.getCategory() == DEFAULT) {
                   System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                             outlet[i].getOutletName());
    Now in the other class that I want to modify the array elements I use the following code but I get an error that "The expression type must be an array but a Class ' Outlet' is resolved".
    So how can I modify the array elements? What do I have to instantiate to get the following code to work?
    public class Franchise {
         private Franchise[] franchise;
         public Outlet[] outlet;
         public static void createFranchise(Franchise[] franchise) throws FileNotFoundException {
              Scanner console = new Scanner(System.in);
              int choice = -1;
    ++++++++++++++++++++++++++++++++++++
              Outlet outlet = new Outlet();
              Outlet.readFile(outlet.getOutlet());
    ++++++++++++++++++++++++++++++++++++
              boolean invalidChoice = true;
              while (invalidChoice) {
              System.out.println("\nCreating a New Franchise...");
              System.out.println(STARS);
              System.out.println("Please select an outlet from the list below");
              Outlet.displayUnassignedOutlets(outlet.getOutlet());
              choice = console.nextInt();
              if (choice < 0 || choice > 10) {
                   System.out.println("Error! Please choose a single number between 1 and 10");               
              else {
                   invalidChoice = false;
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the Phone Number for this Outlet");
                   choice = console.nextInt();
                   String phone = new String();
              phone = new Integer(choice).toString();
                   if (phone.length() < 8 || phone.length() > 10) {
                        System.out.println("Error! Please enter 8 to 10 digits only");
                   else {
    +++++++++++++++++++++++++++++++++++++++
                        outlet[(choice - 1)].setPhoneNumber(choice);
    +++++++++++++++++++++++++++++++++++++++
                        invalidChoice = false;

    Hi Pete!
    Thanks for your comments. I have included my full classes below with their respective driver modules. Hope this helps out a bit more using the code tags. Sorry, it was my first posting. Thanks for the heads up!
    import java.util.*;
    import java.io.*;
    public class Outlet {
         public Outlet[] outlet;
         private String outletName;
         private int phoneNumber;
         private int category;
         private int operatingDays;
    //     private Applicant chosenApplicant;
         static boolean SHOWDETAILS = false;
         static final String STARS = "****************************************";
         static final int MAXOUTLETS = 10;
         static final int DEFAULT = 99;
         public Outlet[] getOutlet() {
              return outlet;
         public String getOutletName() {
              return outletName;
         public int getPhoneNumber() {
              return phoneNumber;
         public int getCategory() {
              return category;
         public int getOperatingDays() {
              return operatingDays;
         public void setOutletName(String newOutletName) {
              outletName = newOutletName;
         public void setPhoneNumber(int newPhoneNumber) {
              phoneNumber = newPhoneNumber;
         public void setCategory(int newCategory) {
              category = newCategory;
         public void setOperatingDays(int newOperatingDays) {
              operatingDays = newOperatingDays;
         public Outlet() {
              outlet = new Outlet[10];
         public static void readFile(Outlet[] outlet) throws FileNotFoundException {
              Scanner inFile = new Scanner(new FileReader("outlets.txt"));
              int rowNo = 0;
              int i = 0;
              String outletValue;
              while (inFile.hasNext() && rowNo < MAXOUTLETS) {
                   outlet[rowNo] = new Outlet();
                   outletValue = inFile.nextLine();
                   outlet[rowNo].setOutletName(outletValue.toUpperCase());
                   //System.out.println(rowNo % 2);
              //     if (rowNo % 2 == 0) {
                   outlet[rowNo].setPhoneNumber(DEFAULT);
                   outlet[rowNo].setCategory(DEFAULT);
                   outlet[rowNo].setOperatingDays(DEFAULT);
    //               System.out.println("Outlet Name+++++++  " + rowNo + "\n" + outlet[rowNo].getOutlet());               
                   rowNo++;
         //          System.out.println(rowNo);
              if (SHOWDETAILS) {
                   if (rowNo > 6) {
                        for (i = 0; i < rowNo; i++ ) {
                             System.out.println("\nOutlet Name+++++++  " + (i + 1) + "\t" +
                                       outlet.getOutletName());
              inFile.close();
         public static void displayAllOutlets(Outlet[] outlet) {
              int i = 0;
              System.out.println("Showing All Outlets");
              System.out.println(STARS);
              for (i = 0; i < MAXOUTLETS; i++ ) {
                   System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                             outlet[i].getOutletName());
         public static void displayUnassignedOutlets(Outlet[] outlet) {
              int i = 0;
              System.out.println("Showing all unassigned Outlets");
              System.out.println(STARS);
              for (i = 0; i < MAXOUTLETS; i++ ) {
                   if (outlet[i].getCategory() == DEFAULT) {
                   System.out.println("\nOutlet Number: " + (i + 1) + "\t" +
                             outlet[i].getOutletName());
         public static void main(String[] args) throws FileNotFoundException {
              Outlet start = new Outlet();
              Outlet.readFile(start.getOutlet());
              Outlet.displayUnassignedOutlets(start.getOutlet());
    ================================
    So in the below Franchise class, when I specify:
    outlet[(choice - 1)].setPhoneNumber(choice);
    I get the error that an array is required but the class Outlet is resolved. Any feedback is greatly appreciated!
    import java.io.FileNotFoundException;
    import java.io.PrintWriter;
    import java.util.*;
    public class Franchise {
         private Franchise[] franchise;
         public Outlet[] outlet;
         static final int MAXOUTLETS = 10;
         static final int DEFAULT = 99;
         static boolean SHOWDETAILS = false;
         static final String STARS = "****************************************";
         static final double REGHOTDOG = 2.50;
         static final double LARGEHOTDOG = 4;
         static final int SALESPERIOD = 28;
         static final int OPERATINGHOURS = 8;
         public Franchise[] getFranchise() {
              return franchise;
         public Franchise() {
         public static void createFranchise(Franchise[] franchise) throws FileNotFoundException {
              Scanner console = new Scanner(System.in);
              int choice = -1;
              //franchise[i] = new Franchise();
              Outlet outlet = new Outlet();
              //outlet[i] = new Franchise();
              Outlet[] myOutlet = new Outlet[10];
              Outlet.readFile(outlet.getOutlet());
              boolean invalidChoice = true;
              while (invalidChoice) {
              System.out.println("\nCreating a New Franchise...");
              System.out.println(STARS);
              System.out.println("Please select an outlet from the list below");
              Outlet.displayUnassignedOutlets(outlet.getOutlet());
              choice = console.nextInt();
              if (choice < 0 || choice > 10) {
                   System.out.println("Error! Please choose a single number between 1 and 10");               
              else {
                   invalidChoice = false;
              //System.out.println(j);
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the Phone Number for this Outlet");
                   choice = console.nextInt();
                   String phone = new String();
                  phone = new Integer(choice).toString();
                   if (phone.length() < 8 || phone.length() > 10) {
                        System.out.println("Error! Please enter 8 to 10 digits only");
                   else {
                        outlet[(choice - 1)].setPhoneNumber(choice);
                        invalidChoice = false;
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the category number for this Outlet");
                   choice = console.nextInt();
                   if (choice < 1 || choice > 4) {
                        System.out.println("Error! Please choose a single number between 1 and 4");
                   else {
                        outlet.setCategory(choice);
                        invalidChoice = false;
              invalidChoice = true;
              while (invalidChoice) {
                   System.out.println("Please enter the Operating Days for this Outlet");
                   choice = console.nextInt();
                   if (choice < 5 || choice > 7) {
                        System.out.println("Error! Please choose a single number between 5 and 7");
                   else {
                        outlet.setOperatingDays(choice);
                        invalidChoice = false;
    //          Applicant chosenApplicant = new Applicant();
         //     Applicant.readFile(chosenApplicant.getApplicant());
              //Applicant.checkCriteria(chosenApplicant.getApplicant());
         //     System.out.println("This Franchise has been assigned to : " +
              //          chosenApplicant.displayOneEligibleApplicant());
              Outlet.displayUnassignedOutlets(outlet.getOutlet());
         public static void main(String[] args) throws FileNotFoundException {
              Franchise start = new Franchise();
              Franchise.testing(start.getFranchise());
              //Franchise.createFranchise(start.getFranchise());
              //Franchise.displaySalesForcast();
              //Franchise.displayAllFranchises(start.getOutlet());

  • How to fix "Modifying a column with the 'Identity' pattern is not supported"

    When doing Code First Migrations my mobile service always errors in the seed method with: 'Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Methodology' for the CreatedAt column. All my
    models inherit from EntityData. 
    // Sample model
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using Microsoft.WindowsAzure.Mobile.Service;
    namespace sbp_ctService.Models
    public class Methodology : EntityData
    public Methodology()
    this.Scenarioes = new List<Scenario>();
    public string Id { get; set; }
    [Required]
    [StringLength(50)]
    public string EntryMethod { get; set; }
    [Required]
    [StringLength(50)]
    public string TestDirection { get; set; }
    [Required]
    [StringLength(50)]
    public string PassCriteria { get; set; }
    [Required]
    [StringLength(50)]
    public string Dependency { get; set; }
    public bool ExtraInfo { get; set; }
    public virtual ICollection<Scenario> Scenarioes { get; set; }
    And in my Configuration.cs file during an update here's my seed method:
    protected override void Seed(sbp_ctService.Models.sbp_ctContext context)
    // This method will be called after migrating to the latest version.
    context.Methodologies.AddOrUpdate(
    m => m.Id,
    new Methodology { Id = "Methodology1", EntryMethod = "P/F", PassCriteria = "P/F", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology2", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Round" },
    new Methodology { Id = "Methodology3", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "In/Out" },
    new Methodology { Id = "Methodology4", EntryMethod = "P/F", PassCriteria = "Best", Dependency = "None", ExtraInfo = false, TestDirection = "Out" }
    For some reason on an update the CreatedAt field is created and given a value of null. So of course on an insert/update it will error because CreatedAt is an Identity field.
    I've tried to configure the modelBuilder in my context to tell it that CreatedAt is an identity field, but that still doesn't work.
    modelBuilder.Entity<Methodology>()
    .Property(m => m.CreatedAt)
    .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
    So far the only way to fix this is by commenting out my Seed data, but it's not a fix. I've seen other solutions where you can force it to not serialize certain fields, but I don't know if those solutions apply.

    So I think this occurs because you might have created the database (Code-first) with POCOs that didn't have the CreatedAt field in them. I think that's what I did and the easiest way to fix it for me was to delete my database and re-create it with my POCOs
    inheriting from Entity Data from the very beginning. We were still in development so it worked out for us but I know some people might not be able to do that. Here's what my table looks like after it was created correctly:
    USE [database_name]
    GO
    /****** Object: Table [sbp_ct].[Methodologies] Script Date: 2/24/2015 9:48:45 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [schema_name].[Methodologies] (
    [Id] NVARCHAR (128) NOT NULL,
    [EntryMethod] NVARCHAR (50) NOT NULL,
    [TestDirection] NVARCHAR (50) NOT NULL,
    [PassCriteria] NVARCHAR (50) NOT NULL,
    [Dependency] NVARCHAR (50) NOT NULL,
    [ExtraInfo] BIT NOT NULL,
    [Version] ROWVERSION NOT NULL,
    [CreatedAt] DATETIMEOFFSET (7) NULL,
    [UpdatedAt] DATETIMEOFFSET (7) NULL,
    [Deleted] BIT NOT NULL,
    [Name] NVARCHAR (MAX) NULL
    GO
    CREATE CLUSTERED INDEX [IX_CreatedAt]
    ON [schema_name].[Methodologies]([CreatedAt] ASC);
    GO
    ALTER TABLE [schema_name].[Methodologies]
    ADD CONSTRAINT [PK_schema_name.Methodologies] PRIMARY KEY NONCLUSTERED ([Id] ASC);
    Does yours look something like that?

  • Error in CodeFirst Seed with migrations : Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Category'.

    Hi,
    I have activated migrations on my Azure Mobile Services project. I filled the new seed function Inside the Configuration.cs class of the migrations. If the tables are empty, the seed function is going without any problems. When my AddorUpdate tries to update
    the first object I get the error in the inner exception : "Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'. Table: 'CodeFirstDatabaseSchema.Category'."
    Part of my code is as follows:
    context.categories.AddOrUpdate(
    new Category { Id="1", Code="GEN", Text="General"},
    new Category { Id="2", Code="POL", Text="Politics"},
    new Category { Id="3", Code="FAS", Text="Fashion"},
    new Category { Id="4", Code="PEO", Text="People"},
    new Category { Id="5", Code="TEC", Text="Technology"},
    new Category { Id="6", Code="SPO", Text="Sport"},
    new Category { Id="7", Code="LIV", Text="Living"}
    Any help is welcomed. Thanks.
    Faical SAID Highwave Creations

    This occurred to me because I changed my POCO models to inherit from EntityData after I had already created my database without the extra Azure Mobile Service properties (UpdatedAt, CreatedAt, Deleted). The only way I fixed it was to drop the database and
    start over with my classes inheriting from EntityData from the beginning. If you can't do that then I would create a new table with EntityData models and see how that database is created and manually update your tables to match those. Here's an image of one
    of my tables from the management console on Azure. You can see that CreatedAt is an index.

  • "Modifying a column with the 'Identity' pattern is not supported. Column: 'CreatedAt'.

    I am using code fist migration and second time I run the service, I got this error.
     "Modifying
    a column with the 'Identity'pattern
    is not supported. Column:
    'CreatedAt'. 
    context.Cars.AddOrUpdate(c => c.Id,
    new Car { Id = "60B0891B-C3CF-41A6-9BE0-BCCCE5949E6B", Image = "ic_highlander", Name = "Highlander", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "YGN" },
    new Car { Id = "BAA205B5-C43F-490E-A83B-81F0EBDA2D97", Image = "ic_super_custom", Name = "Super Custom", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "YGN" },
    new Car { Id = "DD68E56D-3967-4D32-A959-BEFBCB70FC4B", Image = "ic_mark_ii_grande", Name = "MarkII GRANDE", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "YGN" },
    new Car { Id = "8EDDC308-FB63-469B-8A6A-B2360D61892D", Image = "ic_hiace_commuter_13", Name = "Hiace commuter", Description = "4 SEATER, FULL DAY (10 HRS), DOWNTOWN EXCLUDING INDUSTRIAL ZONE, WITH ENGLISH SPEAKING DRIVER", SeatingCapacity = 4, Luggage = 2, Rates = 20000.00M, AirportCode = "MDL" }

    Hi,
    Thanks for posting here.
    We are looking into this and will update you with solution. Stay tuned for details
    Girish Prajwl

  • String Array declaration with multiple lines

    I have an array declaration with several indexes where it covers multiple lines.
    Please advise if this is the best way to declare an array declaration with multiple lines:
    String cityString = "San Diego, Oakland, London, New York, Dublin," +
    "Dallas, Milan";
    String city[] = cityString.split(",");

    String[] city = {"San Diego", "Oakland", "London",
    "New York", "Dublin", "Dallas", "Toronto"};You can use indentation and line breaks as you like, as usual in Java.

  • Billing Document positions with zero

    Hi Guys,
    I am having an error when creating SD Billing Document. I have a sales order with some position with net value 0 and when I create the billing document I dont want this positions to be copied.
    I know I can reject this positions on the sales order, but this process is something automatic and there is no control.
    Is there anything I can do on the control copy to avoid copying values on 0 from sales order to billing document?
    I hope you can hel me.
    J. Garibaldi

    Hi,
    You can create a new item category " ZXXX"and make it as not relevant for billing in billing relavancefield and also maintain the item category determintaion settings.
    Now when you have line item with 0 value change the item category to "ZXXX" and save the document . So when you create a billing for the respective sales order the particular line item with item cat as "ZXXX" will not be copied.
    OR
    You can create a new routine in the transaction VOFM and assign it in the copy control of order --> billing at item cat level.
    Please go through the below link to create the new routine
    http://saptechsolutions.com/pdf/VOFMCopyRequirementRoutines.pdf
    Hope this will help you to resolve your issue!!
    Regards,
    Krishna O

  • Problem in displaying Array Position?

    hi,
    I am having a problem in displaying the array position of a sorted Array
    for ex:
    int[] a = {4,3,1,7}for sorting the array i am using Arrays.sort(a); then the output will be
    a = {1,3,4,7}now according to this i need to display the array position of a before sorting like a should have the output {2,1,0,3} which should be the array position of the sorted array. Any help will be appreciated.
    Thanks.

    for (int i = 0 ; i < unsortedArray.length ; i++)
       for (int j = 0 ; j < sortedArray.length ; j++)
           if (unsortedArray[i] == sortedArray[j]) {
                 System.out.println("position for element "+i+" is "+j);
                 break;
           }notice that if you have duplicate values, the position of the duplicate will always be considered as the first occurence of this value

  • Getting the error access denied trying to modify the workbook with identifier in Disocverer Admin

    Hi All,
    I have exported a workbook created by business user as an .eex file logging in as discoverer admin from a Production enviornment (transactional databse) and trying to import it to a different environment called reporting environment ( non transactional databse) and getting a warning 'WFS GTP REPORT SINAPORE.eex:Access denied trying to modify the workbook with identifier 'WFS_GTP_REPORT_SINGAPORE'.
    It says Files Partially Imported so clicked on Finish to complete the import.
    The report has been imported under the user account but the sharing to the different responsibilities/Users has not been imported. I need to import the report with the sharing of the responsibilities/users as well.
    I do not have an option login into discoverer administratore using the user account, i can only login using the administator account ( i know loging in as the business user it self will allow you to import the sharing). But our DBA's oppse this is a security threat for the users as you are logging in as the user in production environment.
    Please help with this issue.

    I have the same problem, and I figured out that my windows is installed in french, and every users groups are created in french also, groups like Everyone don't exists and i can't change by console.
    Regards, Roberto Borges please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • How to make 1D Array but with only one element filled in Real Time

    Hi folks,
    here I am with another question. I want to implement an prediction discrete state space observer which is going to run on a CRIO real time target. I am going to do it just like in the example which comes with LV.
    I have some questions regarding the input and outputs which in the example those are "dummy".
    My model is a SISO model, but the function "Construct SS model" returns parameters (A,B,C,D Matrices) as 2D arrays, so once you connect the cluster model into the Discrete Observer model, it takes y and u as 1D arrays despite of the fact that there is a SISO model.
    I realized that the function I am using in the simulations, uses 1D arrays but with only one element filled:
    Does anyone knows how to implement such 1D arrays in Real Time? I guess the way to do it is preallocating one array of zeros of size 1, and then recirculating it through some SR, and replacing the element with my real input and output, but at the dummy.vi, they are using a simple "build array"
    function.

    Ok, I did it that way. But I am facing another problem right now...
    At some point the Discrete Observer return a NAN array, you will see the code in the code snippet?
    I get rid of that component by component, but the observer gets "stuck" in it. So my Control law is zero... but the state stimate is NAN.
    Also I am attaching the VI.
    I do not know why, since in the simulation program all runs well. any thoughts? Maybe the internal numeric precision of the State Space Model?
    Attachments:
    RT - Pole Placement + Complete Observer.vi ‏40 KB

  • Change this to an XML array collection with an HTTP service in flex 3.0

    I need to change this to an XML array collection with an HTTP
    service in flex 3.0
    private var flatData:ArrayCollection = new ArrayCollection([
    { Country:"India", State:"Karnataka", Region:"South-West",
    Company:"Horizon", Product:"flexo",
    Year:"2000", Quarter:"Q1", Month:"Jan", Sales:-10, Cost:5,
    Production: 20 },
    { Country:"India", State:"Tamil Nadu",
    Region:"South-East",Company:"Horizon", Product:"flexo",
    Year:"2000", Quarter:"Q1", Month:"Mar", Sales:10, Cost:5,
    Production: 20 },
    { Country:"India", State:"Kerala", Region:"South-West",
    Company:"Horizon", Product:"flexo",
    Year:"2000", Quarter:"Q4", Month:"Nov", Sales:10, Cost:5,
    Production: 20},
    { Country:"India", State:"Assam", Region:"North-East",
    Company:"Horizon", Product:"Trinetra",
    Year:"2000", Quarter:"Q1", Month:"Feb", Sales:40, Cost:20,
    Production: 20 },
    { Country:"India", State:"Kerala", Region:"South-West",
    Company:"Horizon", Product:"Trinetra",
    Year:"2000", Quarter:"Q4", Month:"Dec", Sales:55, Cost:27.5,
    Production: 20 },
    { Country:"India", State:"Karnataka", Region:"South-West",
    Company:"Horizon", Product:"Trinetra",
    Year:"2000", Quarter:"Q2", Month:"Apr", Sales:20, Cost:10,
    Production: 20 },
    // confusion
    { Country:"India", State:"Delhi", Region:"North-East",
    Company:"Confusion", Product:"Besto",
    Year:"2000", Quarter:"Q1", Month:"Jan", Sales:20, Cost:10,
    Production: 20 },
    { Country:"India", State:"Orissa", Region:"South-East",
    Company:"Confusion", Product:"Besto",
    Year:"2000", Quarter:"Q1", Month:"Feb", Sales:10, Cost:5,
    Production: 20 },
    { Country:"India", State:"Gujrat", Region:"North-West",
    Company:"Confusion", Product:"Besto",
    Year:"2001", Quarter:"Q4", Month:"Oct", Sales:50, Cost:25,
    Production: 20 },
    { Country:"India", State:"Delhi", Region:"North-East",
    Company:"Confusion", Product:"Besto",
    Year:"2001", Quarter:"Q4", Month:"Nov", Sales:60, Cost:30,
    Production: 20 },
    { Country:"India", State:"Tamil Nadu",Region:"South-East",
    Company:"Confusion", Product:"Besto",
    Year:"2001", Quarter:"Q4", Month:"Dec", Sales:70, Cost:35,
    Production: 20},
    { Country:"India", State:"Gujrat", Region:"North-West",
    Company:"Confusion", Product:"Best",
    Year:"2000", Quarter:"Q1", Month:"Mar", Sales:30, Cost:15,
    Production: 20 }
    can u pls tell me

    Create a uriTemplate like this
    /auth?uname={uname}&pass={pass}
    use GET method only.
    generate the personalization keys.

Maybe you are looking for

  • How to install windows 7 in dual boot on Satellite M840?

    Hi, I got this M-840 Notebook a week ago pre-installed with windows 8. I cannot replace the OS with windows 7 as most of my applications are Win 8 incompatible. I tired clean install - doesn't work. I created a NTFS partition and tried installing win

  • How to reconnect Time machine to backup file on hard drive

    How do I reconnect my Time Machine to the Backups.backupdb on a hard drive? Time Machine got set to a new drive but I want to return to the older backup.

  • SNAP table

    Hi All, We are facing large number no of dumps in our ECC6.0. So I want to know some information for SNAP table which stores dump data. 1 )  How to check how many entries can be store in SNAP table or what is the size of this table to proactive take

  • Interactive Forms in 470

    Dear all.      I have another Question, is there any note that explain why its not possible to install this solution (ADS - Adobe Document Service) and the JAVA Instance in the same AP server here the 470 R/3 version is instaled.      Example:       

  • Crackled phone line and incredibly slow BB connect...

    Hi Im having serious issues with my phone line and BB connection. It has been ongoing for some time, roughly 6-8 weeks. The line becomes crackly with noise becoming so bad at times, you cannot hear the other person on the phone. This usually occurs i