Infotable Source on Widget Development
Hi everybody,
I have been stuck on this for a while. I had developed several widgets before but I had never needed an infotable as output/source. I have found an small example as answer on another topic of this forum, but I can´t seem to make it work. I tried to use the Grid widget that Thingworx has an example, but I am still stuck.
On the .ide file, I have the infotable defined as this:
'EditedTable': {
'isBindingSource': true,
'baseType': 'INFOTABLE',
'description': 'Infotable where all the modifications are getting saved'
},
And on the .runtime file I have it like this:
var outputTable = TW.InfoTableUtilities.CloneInfoTable({ "dataShape" : { "fieldDefinitions" : infoTableDataShape}, "rows" : item_Data_array });
this.updateProperty('EditedTable',outputTable);
I think I am using the correct syntax and that the format of the item_data_array is the right one since I compared it to the infotable that I use as input on the widget (the datashape is directly read from the input one). I have even tried to break the code on the developer mode on Chrome just before setting it, and set this outputTable as the response that I have on the service that send the input infotable.
If it is not so clear, I could add some screenshots.
Regards,
JNanin

