Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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.
Solved! Go to Solution.
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 */
});
Use AddDataTableEntries service can add an infotable to a Datatable, or what else do you mean by Import?
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.
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.
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?
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 */
});