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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

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

AndyHilton
13-Aquamarine

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

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.

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

11 REPLIES 11

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

 

Velkumar
19-Tanzanite
(To:Arun_C)

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

 

 

 

 

 

 

 

AndyHilton
13-Aquamarine
(To:Velkumar)

Hey @Velkumar,

 

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

Velkumar
19-Tanzanite
(To:AndyHilton)

Hi @AndyHilton 

 

In my example, I have set rowNumber as UIDField which is unique for each row.

 

/VR

AndyHilton
13-Aquamarine
(To:Velkumar)

Hey @Velkumar,

 

Thank you.  Can you upload everything from your example?  I'm missing something simple but I just can't seem to figure out what it is.

Velkumar
19-Tanzanite
(To:AndyHilton)

Hi @AndyHilton 

 

Please find attached example entities. Please do let me know if you need more details

 

 

/VR

AndyHilton
13-Aquamarine
(To:Velkumar)

Hey @Velkumar 

 

Looks like I was unable to import due to the following.  

 

AndyHilton_0-1694461026532.png

AndyHilton_2-1694461461835.png

 

 

Looks like there is a valueStream and DataShape connected that weren't included:

AndyHilton_1-1694461204272.png

 

 

Velkumar
19-Tanzanite
(To:AndyHilton)

Hi @AndyHilton 

 

My bad I included dependencies while exporting still some DS got missed. Please find updated entities

 

/VR

Velkumar
19-Tanzanite
(To:AndyHilton)

Hi @AndyHilton 

 

Here I have posted step by step procedure for collection widget mapping. 

 

How to add a progress bar in a grid column? - PTC Community

 

/VR

AndyHilton
13-Aquamarine
(To:Arun_C)

Hey Arun,

 

If I create each of those as a mashup parameter I can't bind them to the Line Chart as you have to bind "Data" to Charts.  How would I then take all of the separate parameters and combine them as an All Data group?

 

AndyHilton_2-1694010505954.png

 

If I create the parameters individually then the Data parameter of the Chart is not available to bind.

 

AndyHilton_1-1694010412792.png

 

 

HI @AndyHilton ,

 

If you have to pass a infotable to collection means, Please find the below given process, It may helps you.

 

  • Create your main service with infotable field which contains the data for your collection's chart along with other required data fields for each row

Arun_C_6-1694013364190.png

  • Bind that service output to the collection's 
  • In child mashup create infotable parameter (labelChartInfotable) and other required fields

Arun_C_7-1694013534464.png

 

  • In Collection - MashupPropertyBinding you need to form JSON 

Arun_C_1-1694012310349.png

  • After that you can bind the mashup infotable parameter (labelChartInfotable) as input Data of your Chart in child mashup

Arun_C_8-1694013736413.png

 

Thanks & Regards,

Arun C

 

Announcements


Top Tags