Skip to main content
13-Aquamarine
September 6, 2023
Solved

Passing an Infotable into a Collection widget where the receiving widget in the child is a Chart.

  • September 6, 2023
  • 1 reply
  • 5028 views

Thingworx 9.4.0.  I thought this would be straight-forward but it's been a nightmare.  As the subject states I'm trying to pass the data from an Infotable into a collection widget. 

 

Setup:

Parent Mashup:

Collection widget:

Mashup -> set to Child mashup

MashupPropertyBinding:

{
"cva": "cva",
"cvu": "cvu",
"mva": "mva",
"mvu": "mvu",
"TagLabel": "TagLabel",
"TimeStamp": "TimeStamp"
}

Data Service: (Data Properties populated with values)

AndyHilton_3-1693971199547.png

 

Child Mashup:

Mashup Parameter

AndyHilton_0-1693970669615.png

LineTrendingVariables_DS:

AndyHilton_1-1693970784229.png

 

Line Chart widget:  (Mashup Parameter data bound)

AndyHilton_2-1693970898839.png

 

Result:

AndyHilton_4-1693971357544.png

 

I was able to verify that the service is being processed and delivering data by placing a Grid widget in the Mashup to collect the data.  This was successful so I know there is data coming in:

AndyHilton_5-1693971439975.png

 

Debug Info:

Here I can see that the system is showing DATA (The mashup parameter shown above in the Child mashup) as undefined.

AndyHilton_0-1693972022655.png

 

 

NOTE:  I'm pretty sure the issue has to do with the MashupPropertyBinding formatting or content but I don't know what that issue might be.

 

 

 

Best answer by Arun_C

Hi @AndyHilton ,

 

In collection MashupPropertyBinding  - JSON should be formed by {"DATASHAPE FIELD NAME" : "CHILD MASHUP PARAMETER NAME"}.

 

In your case have to create the cva, cvu, mva, mvu, TagLabel, TimeStamp each as mashup parameter(not as direct DATA Infotable) and then you can collect your data in child mashup but it will return the Data on child mashup based on the main service output of each row as in collection cells, not complete data in 1 collection cell.

 

Kindly refer these links -

 How to use the Collection Widget in ThingWorx

Infotable as parameter in collection widget

 

Please let me know if any other queries.

 

Thanks & Regards,

Arun C

 

1 reply

Arun_C16-PearlAnswer
16-Pearl
September 6, 2023

Hi @AndyHilton ,

 

In collection MashupPropertyBinding  - JSON should be formed by {"DATASHAPE FIELD NAME" : "CHILD MASHUP PARAMETER NAME"}.

 

In your case have to create the cva, cvu, mva, mvu, TagLabel, TimeStamp each as mashup parameter(not as direct DATA Infotable) and then you can collect your data in child mashup but it will return the Data on child mashup based on the main service output of each row as in collection cells, not complete data in 1 collection cell.

 

Kindly refer these links -

 How to use the Collection Widget in ThingWorx

Infotable as parameter in collection widget

 

Please let me know if any other queries.

 

Thanks & Regards,

Arun C

 

19-Tanzanite
September 6, 2023

Hi @AndyHilton 

 

Adding to @Arun_C  point.

 

If you want to pass InfoTable value to the collection child mashup, your service should return the data as a Child InfoTable. Something like this

 

Velkumar_0-1693975085460.png

 

Collection MashupPropertyBinding should look like this

Velkumar_1-1693975177918.png

 

Output :

Velkumar_2-1693975268173.png

 

/VR

 

 

 

 

 

 

 

13-Aquamarine
September 10, 2023

Hey @Velkumar,

 

What did you set the UIDField of the Collection widget to in your example?