I believe the only way to do this is with a custom extension, but wanted to ask the collective before starting down that path. I have a data structure being stored in a DataTable. I need to export just my DataShape properties to JSON format. I tried the DataExporter button and while it did give me a JSON dataset, it included entirely too much information.
My DataShape has a few more properties than what I need in my export but basically it has a name property and two infotable properties (dataFields and allowedOperators) . I need my export to look as follows:
{
"id" : 1,
"name": "protocol 1",
"connections":
{
"datafields": [
[
{"name": "Charter Med Lot No" },
{"name":"Donation No-Pooling Bag"},
{"name":"Donation No-Comp1"},
{"name":"Product Code-Comp1"}
],
[
{"name":"Donation No-Comp2"},
{"name":"Product Code-Comp2"}
],
[
{"name":"Donation No-Comp3"},
{"name":"Product Code-Comp3"}
]
],
"allowedoperators": ["1234", "6789"]
}
}
I can write the javascript to parse my DT and create a string in the above format, so my specific question is if I have the above passed to a service result as a string, is there an out of the box Thingworx service I can call to write that string to a file repository?
Solved! Go to Solution.
Found the answer by creating a new Thing that implements a FileRepository Thing Template. All the services I need were in the thing.
Found the answer by creating a new Thing that implements a FileRepository Thing Template. All the services I need were in the thing.