4 Replies Latest reply on Feb 9, 2017 8:38 AM by jkaczynski-2 RSS
    bmarimuthu Apprentice

    Error in creating datashape

    Hi!!!

    I have a query call that returns a single data in varchar format.I want to bind my result with the datashape for using it in my mashup.But I couldn't match up datashape for the executed query, though the service works fine.

    Please help me with this!!

      • Re: Error in creating datashape
        supandey Collaborator

        Hi Bavirthraa, are you binding the data to DataShape or DataTable? If you are looking for persisting the data you should bind it to a DataTable and not to to the DataShape, since Shape is there only for defining how the data will be represented in the system for storing you have to pick DataTable, Stream or Value Stream, whatever fits to your use case.

         

        Can you share how you are binding the data?

          • Re: Error in creating datashape
            jkaczynski-2 Creator

            Hello,

             

            From what Bavithraa Marimuthu mentioned, I believe the use case is that she gets the data from the external DB and wants to show it directly in the mashup. I can guess, that in the mashup the data is going to be displayed in the grid. Additionally, I can also guess that the service that performs a query has no DataShape on the output InfoTable (if I am wrong on any of my assumptions, please correct me Bavithraa).

             

            If I guessed right, you have two options:

            1. To select "ShowAllColumns" in your grid properties to true - then everything will be shown, but you won't have a possibility to format the grid display of the columns.

            2. You can run your service from the Composer (by using Test button), then click on the "Create DataShape from Result" button - the appropriate fields in the DataShape would be added automatically, you need only to give a name to DataShape object and set it as output InfoTable's DataShape in your service.

             

            Possibility 2 is more flexible regarding the configuration abilities in the mashup, but it's not a good choice if you have uncertain columns selected by query.

             

            Hope that I correctly guessed the use case. If I'm wrong on anything, please correct me and I'll try to help further.

             

            Regards,

            J.