cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

I want to show data from 2 different sources in one table

Highlighted
Aquamarine

I want to show data from 2 different sources in one table

I have the part information from windchill that shows me number lifecycle state etc.

WC Part numberLifecyccle state
123456789RELEASED

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 numberCostStock
1234567892510

Like this

Part numberLifecycle statecostStock
123456789RELEASED2510
7 REPLIES 7

Re: I want to show data from 2 different sources in one table

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.

Re: I want to show data from 2 different sources in one table

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?

Re: I want to show data from 2 different sources in one table

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

Re: I want to show data from 2 different sources in one table

Re: I want to show data from 2 different sources in one table

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);

Re: I want to show data from 2 different sources in one table

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

Re: I want to show data from 2 different sources in one table

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.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________