Skip to main content
14-Alexandrite
May 27, 2020
Solved

Import Infotable to Datatable

  • May 27, 2020
  • 5 replies
  • 2333 views

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. 

Best answer by zyuan1

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 */
});

5 replies

5-Regular Member
May 28, 2020

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

WilsonT14-AlexandriteAuthor
14-Alexandrite
May 28, 2020

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.

5-Regular Member
May 28, 2020

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.