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

Import Infotable to Datatable

SOLVED
Highlighted
Aquamarine

Import Infotable to Datatable

Hi Thingworx Gurus,

 

I would like to know if there is a way to import an infotable into a datatable?

 

The reason is that I would like to display the infotable content into Advanced Grid widget and to enable filtering and sorting capabilities. It seems like the filtering and sorting features can only works when the data source is Datatable. If there is anyway that can have an infotable to work with Advanced Grid widget's filtering and sorting, would appreciate if you can share.

 

*Note: I have read this post and it seems that the suggested way (using InfotableFunction resource) is not working for me. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Import Infotable to Datatable

The Values part is the infotable input.

 

If you utilize the service in a mashup, you can actually bind an infotable to its input area.

And in the script it looks like this:

Things["PartsTable"].AddDataTableEntries({
sourceType: undefined /* STRING */,
values: undefined /* INFOTABLE */,
location: undefined /* LOCATION */,
source: undefined /* STRING */,
tags: undefined /* TAGS */
});

View solution in original post

5 REPLIES 5
Highlighted

Re: Import Infotable to Datatable

Use AddDataTableEntries service can add an infotable to a Datatable, or what else do you mean by Import?

Highlighted

Re: Import Infotable to Datatable

Hi Ryan,

 

Thanks for the response.

 

May I know how to use AddDataTableEntries service to add an infotable to a DataTable? If scripting is required, appreciate if you can share a sample with me.

 

Thanks.

Highlighted

Re: Import Infotable to Datatable

It's the default and first service in the list which you can see in a Datatable entity,  infotable is one of it's input, and it doesn't need much customized script, you can test on the composer directly.

 

Only note that the infotable and Datatable entity share the same Datashape.

Re: Import Infotable to Datatable

Hi Ryan,

 

Looking at the input parameters of AddDataTableEntries service, I dont see any input as Infotable. How can I define an Infotable in this case?

 

WilsonT_0-1590653004557.png

 

Highlighted

Re: Import Infotable to Datatable

The Values part is the infotable input.

 

If you utilize the service in a mashup, you can actually bind an infotable to its input area.

And in the script it looks like this:

Things["PartsTable"].AddDataTableEntries({
sourceType: undefined /* STRING */,
values: undefined /* INFOTABLE */,
location: undefined /* LOCATION */,
source: undefined /* STRING */,
tags: undefined /* TAGS */
});

View solution in original post

Announcements

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