1 Reply Latest reply on May 15, 2017 9:42 AM by vr-2 RSS
    dsenniappan Explorer

    How to assign Query results to Datashape

    Hi ,


    I have a query result like below,






    I have a Datashape with 3 fields - Field1, Field2 , Field3.


    How to assign the Row1 to Field1 ?


    Thanks in advance for your answer. 

      • Re: How to assign Query results to Datashape
        vr-2 Explorer



        Let me assume you are storing query data to variable "info" and your datashape "datashape"


        Create a new Object and add values to fields.


        var newEntry = new Object();

        newEntry.Field1= info.rows[0].Column1

        newEntry.Field2= info.rows[1].Column1

        newEntry.Field3= info.rows[2].Column1

        datashape.AddRow(newEntry); // Add Object to DataShape