Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I have the part information from windchill that shows me number lifecycle state etc.
WC Part number | Lifecyccle state |
---|---|
123456789 | RELEASED |
on the same mashup I can display the erp info like cost and stock for the same part. how do I show this in one table?
ERP part number | Cost | Stock |
---|---|---|
123456789 | 25 | 10 |
Like this
Part number | Lifecycle state | cost | Stock |
---|---|---|---|
123456789 | RELEASED | 25 | 10 |
You can make service for windchill separately and one for erp.
Then you can club the services by calling the service name using Union script available in the thingworx composer.
Hi,
Thanks. Can you elaborate on how to do this?
I'm not sure what you mean by club the services and calling the service name?
Hi,
You can call first the windchill service and store it in the infotable.
var params = {
Windchill: Windchill /* STRING */;
};
var result1 = me.getWindchill(params);
Then you can call erp service and store it in the infotable.
var params = {
erp=erp;
};
var result2 = me.geterp(params);
Now, you can call the above infotables and combine them using below script:
var params = {
t1: result1/* INFOTABLE */,
t2: result2/* INFOTABLE */
};
// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Union(params);
and now u can bind the service output to mashup.
Thanks,
Aditya Kumar
I am trying to get the ERP information into Thingworx. Can you please help me on how you have achieved for showing of ERP details in the mashup. Which API's you have used or any library or extension need to import in the Thingworx ?
Thanks,
Hemanth kumar
Hi,
To retrieve the data I'm using the Windchill connectors to get the windchill data. For the ERP I'm using the standard database drivers.
The problem that I have not yet figured out yet is to some how bring those into one service and use the suggested join scripts.
Bryan
You must implement a Helper Thing let's call it "MyJoinedConnector" and add up a service which calls the previous Connectors and returns the Joined result.
Then you just need to add up MyJoinedConnector on your Mashup and call the given service to show it on the grid.
Hi, instead of union what you need it's Intersect snippet:
var params = {
columns1: "*",
columns2: "Cost,Stock"
joinType: "INNER",
t1: result1,
t2: result2,
joinColumns1: "WC Part Number",
joinColumns2: "ERP part number"
};
// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Intersect(params);