cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in creating datashape

SOLVED
Highlighted

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!!

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error in creating datashape

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.

View solution in original post

4 REPLIES 4

Re: Error in creating datashape

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

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.

View solution in original post

Re: Error in creating datashape

Hi Jacub!!

you are absolutely correct. Now I could get my desired result.

Thanks!!

Re: Error in creating datashape

Hi Bavithraa,

I'm glad that I could help. You can mark my answer as a "correct" one, so other users would know that the problem is solved.

Regards,

J.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________